554325746@qq.com
2019-12-23 0222e79afe45d9fc55aed9a7e62ca239c228ab73
extend/config/config.go
@@ -29,6 +29,8 @@
   SudoPassword  string      `mapstructure: "sudoPassword"` //系统密码
   SysThresholds []threshold `mapstructure: "sysThresholds"`
   PTZSpeed      int         `mapstructure: "ptzSpeed"` // 云台移动速度
   PatchPath       string `mapstructure:"patchPath"`//系统更新包路径
   BakPath         string `mapstructure:"bakPath"`//系统更新包路径
}
var Server = &server{}
@@ -86,7 +88,7 @@
   viper.AddConfigPath("/opt/vasystem/config/")
   err = viper.ReadInConfig()
   if err != nil {
      log.Fatal("error on parsing configuration file")
      log.Fatal("error on parsing configuration file",err)
   }
   viper.UnmarshalKey("es", EsInfo)
   viper.UnmarshalKey("server", Server)