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"
)
@ -15,5 +16,5 @@ func main() {
Pass: "1",
}
g.Dump(gvalid.CheckStruct(user, nil).Maps())
g.Dump(gvalid.CheckStruct(context.TODO(), user, nil).Maps())
}