// InitFile default value from file .
InitFile default value from file .
// InitFile default value from file .
func InitFile(filename string) error {
	if _, e := os.Stat(filename); e != nil {
		fmt.Println("init default config file: ", filename)
		if err := SaveToFile(); err != nil {
			fmt.Println("shit,fail", err)
		}
	}
	bs, err := ioutil.ReadFile(filename)
	if err != nil {
		return err
	}
	if err := yaml.Unmarshal(bs, &_info); err != nil {
		fmt.Println("read config file error: ", err.Error())
		return err
	}
	return nil
}
func InitFile ( filename string ) error { if _ , e := os . Stat ( filename ) ; e != nil { fmt . Println ( " " , filename ) if err := SaveToFile ( ) ; err != nil { fmt . Println ( " " , err ) } } bs , err := ioutil . ReadFile ( filename ) if err != nil { return err } if err := yaml . Unmarshal ( bs , & _info ) ; err != nil { fmt . Println ( " " , err . Error ( ) ) return err } return nil }
InitFile default value from file .
InitFile default value from file .