package robot import ( "go_dreamfactory/lego/utils/mapstructure" "go_dreamfactory/modules" ) type ( Options struct { modules.Options OutFilePath string //输出文件报表 ServerAddr string //服务地址 ServerID string //服务ID RobotTotalNum int32 //机器人总数 RobotSingleNum int32 //单词机器人进入数量 Intervals int32 //间隔时间 单位秒 RobotName string //机器人名称 RobotStart int32 //机器人初始下标 RobotLog bool Pipeline []Pipeline //执行流水线 } ) func (this *Options) LoadConfig(settings map[string]interface{}) (err error) { if settings != nil { if err = this.Options.LoadConfig(settings); err != nil { return } err = mapstructure.Decode(settings, this) } return }