app.go 241 B

1234567891011121314
  1. package conf
  2. import "github.com/BurntSushi/toml"
  3. // AppSetting .
  4. type AppSetting map[string]interface{}
  5. // Set .
  6. func (a *AppSetting) Set(text string) error {
  7. if _, err := toml.Decode(text, a); err != nil {
  8. panic(err)
  9. }
  10. return nil
  11. }