add context for package gvalid.Check* functions

This commit is contained in:
John Guo
2021-05-13 20:56:52 +08:00
parent 23110b5d19
commit cc1224e032
20 changed files with 320 additions and 298 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"context"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gvalid"
)
@ -13,5 +14,5 @@ func main() {
user := &User{}
g.Dump(gvalid.CheckStruct(user, nil))
g.Dump(gvalid.CheckStruct(context.TODO(), user, nil))
}