36 lines
493 B
Go
36 lines
493 B
Go
package humanify
|
|
|
|
import (
|
|
"fmt"
|
|
"io/ioutil"
|
|
|
|
"github.com/BurntSushi/toml"
|
|
)
|
|
|
|
var Eng Locale
|
|
|
|
type Locale struct {
|
|
NoAdmin string `toml:"no_admin"`
|
|
Usage localeUsage
|
|
Autorole localeAutorole
|
|
}
|
|
|
|
type localeUsage struct {
|
|
Autorole string `toml:"autorole"`
|
|
}
|
|
|
|
type localeAutorole struct {
|
|
Success string `toml:"success"`
|
|
}
|
|
|
|
func init() {
|
|
data, err := ioutil.ReadFile("locale.toml")
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
err = toml.Unmarshal(data, &Eng)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
}
|