snow/aid/aid.go
eccentric db9f92bd91 Equip Item; Refactor Loadouts; Move Cache System; ...
Change up attribrutes again.
Fix indent bug.
2023-11-05 01:58:00 +00:00

25 lines
425 B
Go

package aid
import (
"encoding/json"
"os"
"os/signal"
"syscall"
)
func WaitForExit() {
sc := make(chan os.Signal, 1)
signal.Notify(sc, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
<-sc
}
func JSONStringify(input interface{}) string {
json, _ := json.Marshal(input)
return string(json)
}
func JSONParse(input string) interface{} {
var output interface{}
json.Unmarshal([]byte(input), &output)
return output
}