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

This commit is contained in:
Akkia
2022-04-12 17:43:57 +08:00
committed by Akkia
parent c65028188c
commit e1ca2d5a1c
4 changed files with 26 additions and 20 deletions

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)