conf/config.go
@@ -77,7 +77,8 @@ } Prompt struct { SafeProduce string `json:"safeProduce,omitempty"` SafeProduce string `json:"safeProduce,omitempty"` PlcNotConnected string `json:"plcNotConnected,omitempty"` } config struct { @@ -122,6 +123,9 @@ if err := Viper.Unmarshal(&Conf); err != nil { log.Fatalf("Unmarshal err:%v", err) } if Conf.PLC.StandbyTime == 0 { Conf.PLC.StandbyTime = 300 //5分钟 } ShowConfig() }