check
This commit is contained in:
parent
a8bb15f309
commit
521caaa702
|
|
@ -1,10 +1,5 @@
|
|||
package unify
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type BaseResponse struct {
|
||||
Code int `json:"code"`
|
||||
Message string `json:"message"`
|
||||
|
|
@ -39,12 +34,12 @@ type Result struct {
|
|||
}
|
||||
|
||||
func (c *Request) Check() error {
|
||||
if strings.ToLower(c.Os) != "ios" && c.Channel == "" {
|
||||
return errors.New("channel must set")
|
||||
}
|
||||
if c.Version == "" {
|
||||
return errors.New("version must set")
|
||||
}
|
||||
//if strings.ToLower(c.Os) != "ios" && c.Channel == "" {
|
||||
// return errors.New("channel must set")
|
||||
//}
|
||||
//if c.Version == "" {
|
||||
// return errors.New("version must set")
|
||||
//}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue