go_dreamfactory/modules/battletest/options.go
2024-02-29 17:52:44 +08:00

31 lines
626 B
Go

package battletest
import (
"go_dreamfactory/lego/utils/mapstructure"
"go_dreamfactory/modules"
)
type (
Options struct {
modules.Options
OpenCheck bool
BattleServerAddr string
OutFilePath string
MongodbUrl string
MongodbDatabase string
BattleReportId string //战报id
Workers int32 //并发数
TestNum int32 //测试次数
}
)
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
}