mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-25 14:36:35 +08:00
初步实现安装界面
This commit is contained in:
@@ -52,3 +52,12 @@ func (this *APIConfig) SetNumberId(numberId int64) {
|
||||
func (this *APIConfig) NumberId() int64 {
|
||||
return this.numberId
|
||||
}
|
||||
|
||||
// 保存到文件
|
||||
func (this *APIConfig) WriteFile(path string) error {
|
||||
data, err := yaml.Marshal(this)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return ioutil.WriteFile(path, data, 0666)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user