package main import ( "os" "encoding/json" ) type Config struct { Admins []string ServerID string Token string } func readConfig() Config { file, _ := os.Open("config.json") conf := Config{} json.NewDecoder(file).Decode(&conf) file.Close() return conf }