🐝 reformat code

This commit is contained in:
微凉
2021-03-05 21:25:44 +08:00
parent d137ef8759
commit 3138e031f5
28 changed files with 389 additions and 389 deletions

View File

@@ -32,13 +32,13 @@ func CreatNestedFile(path string) (*os.File, error) {
}
// write struct to yaml file
func WriteToYml(src string,conf interface{}){
data,err := yaml.Marshal(conf)
if err!=nil {
log.Errorf("Conf转[]byte失败:%s",err.Error())
func WriteToYml(src string, conf interface{}) {
data, err := yaml.Marshal(conf)
if err != nil {
log.Errorf("Conf转[]byte失败:%s", err.Error())
}
err = ioutil.WriteFile(src,data,0777)
if err!=nil {
log.Errorf("写yml文件失败",err.Error())
err = ioutil.WriteFile(src, data, 0777)
if err != nil {
log.Errorf("写yml文件失败", err.Error())
}
}
}