mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
v2 -> v3
This commit is contained in:
@ -13,8 +13,8 @@ package g
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/util/gmeta"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/util/gmeta"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@ -10,11 +10,11 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v2/os/gproc"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/net/ghttp"
|
||||
"github.com/gogf/gf/v3/os/gproc"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// Go creates a new asynchronous goroutine function with specified recover function.
|
||||
|
||||
@ -7,19 +7,19 @@
|
||||
package g
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/frame/gins"
|
||||
"github.com/gogf/gf/v2/i18n/gi18n"
|
||||
"github.com/gogf/gf/v2/net/gclient"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v2/net/gtcp"
|
||||
"github.com/gogf/gf/v2/net/gudp"
|
||||
"github.com/gogf/gf/v2/os/gcfg"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/gogf/gf/v2/os/gres"
|
||||
"github.com/gogf/gf/v2/os/gview"
|
||||
"github.com/gogf/gf/v2/util/gvalid"
|
||||
"github.com/gogf/gf/v3/database/gdb"
|
||||
"github.com/gogf/gf/v3/database/gredis"
|
||||
"github.com/gogf/gf/v3/frame/gins"
|
||||
"github.com/gogf/gf/v3/i18n/gi18n"
|
||||
"github.com/gogf/gf/v3/net/gclient"
|
||||
"github.com/gogf/gf/v3/net/ghttp"
|
||||
"github.com/gogf/gf/v3/net/gtcp"
|
||||
"github.com/gogf/gf/v3/net/gudp"
|
||||
"github.com/gogf/gf/v3/os/gcfg"
|
||||
"github.com/gogf/gf/v3/os/glog"
|
||||
"github.com/gogf/gf/v3/os/gres"
|
||||
"github.com/gogf/gf/v3/os/gview"
|
||||
"github.com/gogf/gf/v3/util/gvalid"
|
||||
)
|
||||
|
||||
// Client is a convenience function, which creates and returns a new HTTP client.
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package g
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/internal/utils"
|
||||
"github.com/gogf/gf/v3/internal/utils"
|
||||
)
|
||||
|
||||
// SetDebug enables/disables the GoFrame internal logging manually.
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
package g_test
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/net/ghttp"
|
||||
)
|
||||
|
||||
func ExampleServer() {
|
||||
|
||||
@ -12,10 +12,10 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package gins
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gcfg"
|
||||
"github.com/gogf/gf/v3/os/gcfg"
|
||||
)
|
||||
|
||||
// Config returns an instance of View with default settings.
|
||||
|
||||
@ -10,16 +10,16 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/consts"
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/os/gcfg"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/database/gdb"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/consts"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/os/gcfg"
|
||||
"github.com/gogf/gf/v3/os/glog"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// Database returns an instance of database ORM object with specified configuration group name.
|
||||
|
||||
@ -9,8 +9,8 @@ package gins
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/net/gclient"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/net/gclient"
|
||||
)
|
||||
|
||||
// HttpClient returns an instance of http client with specified name.
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package gins
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/i18n/gi18n"
|
||||
"github.com/gogf/gf/v3/i18n/gi18n"
|
||||
)
|
||||
|
||||
// I18n returns an instance of gi18n.Manager.
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/consts"
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/os/glog"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/internal/consts"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/os/glog"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// Log returns an instance of glog.Logger.
|
||||
|
||||
@ -10,14 +10,14 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/database/gredis"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/consts"
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/database/gredis"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/consts"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// Redis returns an instance of redis client with specified configuration group name.
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package gins
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gres"
|
||||
"github.com/gogf/gf/v3/os/gres"
|
||||
)
|
||||
|
||||
// Resource returns an instance of Resource.
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/consts"
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/internal/consts"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/net/ghttp"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// Server returns an instance of http server with specified name.
|
||||
|
||||
@ -10,11 +10,11 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/consts"
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
"github.com/gogf/gf/v2/os/gview"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/internal/consts"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/internal/intlog"
|
||||
"github.com/gogf/gf/v3/os/gview"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// View returns an instance of View with default settings.
|
||||
|
||||
@ -12,11 +12,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/gins"
|
||||
"github.com/gogf/gf/v2/os/gcfg"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/frame/gins"
|
||||
"github.com/gogf/gf/v3/os/gcfg"
|
||||
"github.com/gogf/gf/v3/os/gfile"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -10,11 +10,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/gins"
|
||||
"github.com/gogf/gf/v2/os/gcfg"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/frame/gins"
|
||||
"github.com/gogf/gf/v3/os/gcfg"
|
||||
"github.com/gogf/gf/v3/os/gfile"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
func Test_Database(t *testing.T) {
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/gins"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/frame/gins"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
func Test_Client(t *testing.T) {
|
||||
|
||||
@ -11,13 +11,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/gins"
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
"github.com/gogf/gf/v2/os/gcfg"
|
||||
"github.com/gogf/gf/v2/os/gctx"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/frame/gins"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/net/ghttp"
|
||||
"github.com/gogf/gf/v3/os/gcfg"
|
||||
"github.com/gogf/gf/v3/os/gctx"
|
||||
"github.com/gogf/gf/v3/os/gfile"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
func Test_Server(t *testing.T) {
|
||||
|
||||
@ -11,11 +11,11 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/instance"
|
||||
"github.com/gogf/gf/v2/os/gcfg"
|
||||
"github.com/gogf/gf/v2/os/gfile"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/internal/instance"
|
||||
"github.com/gogf/gf/v3/os/gcfg"
|
||||
"github.com/gogf/gf/v3/os/gfile"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
func Test_View(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user