mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
improve validation manager feature for package gvalid
This commit is contained in:
@ -18,9 +18,10 @@ import (
|
||||
"github.com/gogf/gf/os/glog"
|
||||
"github.com/gogf/gf/os/gres"
|
||||
"github.com/gogf/gf/os/gview"
|
||||
"github.com/gogf/gf/util/gvalid"
|
||||
)
|
||||
|
||||
// Client is a convenience function, that creates and returns a new HTTP client.
|
||||
// Client is a convenience function, which creates and returns a new HTTP client.
|
||||
func Client() *ghttp.Client {
|
||||
return ghttp.NewClient()
|
||||
}
|
||||
@ -110,3 +111,8 @@ func Model(tableNameOrStruct ...interface{}) *gdb.Model {
|
||||
func Redis(name ...string) *gredis.Redis {
|
||||
return gins.Redis(name...)
|
||||
}
|
||||
|
||||
// Validator is a convenience function, which creates and returns a new validation manager object.
|
||||
func Validator() *gvalid.Validator {
|
||||
return gvalid.New()
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"github.com/gogf/gf/net/ghttp"
|
||||
)
|
||||
|
||||
// SetEnabled enables/disables the GoFrame internal logging manually.
|
||||
// SetDebug enables/disables the GoFrame internal logging manually.
|
||||
// Note that this function is not concurrent safe, be aware of the DATA RACE,
|
||||
// which means you should call this function in your boot but not the runtime.
|
||||
func SetDebug(enabled bool) {
|
||||
|
||||
Reference in New Issue
Block a user