Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func SetConfig(path string) *Config {
if path == "" {
path = GetCurrentDirectory() + "/configs/data.yml"
}
conf := &Config{}
var buffer bytes.Buffer
buffer.WriteString(path)
fp := buffer.String()
if ymlFile, err := ioutil.ReadFile(fp); err != nil {
panic(err)
} else if err = yaml.Unmarshal(ymlFile, &conf); err != nil {
panic(err)
}
return conf
}
Init init run environment
func NewCommand ¶
NewCommand returns a new command for binlogo server
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.