package user import ( "yunyan/modules" "yunyan/lego/utils/mapstructure" ) type ( IOptions interface { modules.IOptions } Options struct { modules.Options TokenKey string CBCKey string AvatarUrl string //头像地址 UserGroup int //用户分组 OpenTestAccount bool //是否开启测试账号 TestAccounts []string //是否测试账号 TestAccountPassword string //是否测试账号密码 } ) func (this *Options) LoadConfig(settings map[string]interface{}) (err error) { if settings != nil { if err = this.Options.LoadConfig(settings); err != nil { return } if err = mapstructure.Decode(settings, this); err != nil { return } } return }