query_list_user_response.go
417 字节
package user
import (
"fmt"
"github.com/astaxie/beego/validation"
)
type ListUserResponse struct {
}
func (ListUserResponse *ListUserResponse) ValidateCommand() error {
valid := validation.Validation{}
b, err := valid.Valid(ListUserResponse)
if err != nil {
return err
}
if !b {
for _, validErr := range valid.Errors {
return fmt.Errorf("%s %s", validErr.Key, validErr.Message)
}
}
return nil
}