Compare commits

..

No commits in common. "b9c0b6b282da258f586412cb7597ba8da01b3d6e" and "137255a2e1cdad3544327902f2b17010f9eaa92c" have entirely different histories.

View File

@ -100,7 +100,7 @@ func ValidateOptions(options PriceOptions) (bool, error) {
cover := make(map[int]struct{}) cover := make(map[int]struct{})
for _, opt := range options { for _, opt := range options {
if opt.Num < 0 || opt.Num > 100 { if opt.Num < 0 || opt.Num > 100 {
return false, errors.New("数量参数需为0-99") return false, errors.New("数字范围错误")
} }
if _, ok := symbolSet[opt.Symbol]; !ok { if _, ok := symbolSet[opt.Symbol]; !ok {
@ -130,7 +130,7 @@ func ValidateOptions(options PriceOptions) (bool, error) {
} }
for _, n := range nums { for _, n := range nums {
if _, exist := cover[n]; exist { if _, exist := cover[n]; exist {
return false, errors.New("条件冲突") return false, errors.New("逻辑存在冲突,请重新设置")
} }
cover[n] = struct{}{} cover[n] = struct{}{}