optimize: 优化自动更新相关代码

This commit is contained in:
Akkia authored and Akkia committed 2022-04-12 18:05:26 +08:00
1 parent c65028188c
commit e1ca2d5a1c
4 files changed
+26 -20

No files matched your search

+1
View File
@@ -26,6 +26,7 @@ type AgentConfig struct {
v *viper.Viper
}
// Read 从给点的文件目录加载配置文件
func (c *AgentConfig) Read(path string) error {
c.v = viper.New()
c.v.SetConfigFile(path)