mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
v2 -> v3
This commit is contained in:
@ -9,8 +9,8 @@ package gcode_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
func Test_Case(t *testing.T) {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
package gerror
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
)
|
||||
|
||||
// IEqual is the interface for Equal feature.
|
||||
|
||||
@ -9,7 +9,7 @@ package gerror
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
)
|
||||
|
||||
// New creates and returns an error which is formatted from given text.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
)
|
||||
|
||||
// NewCode creates and returns an error that has error code and given text.
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
package gerror
|
||||
|
||||
import "github.com/gogf/gf/v2/errors/gcode"
|
||||
import "github.com/gogf/gf/v3/errors/gcode"
|
||||
|
||||
// Option is option for creating error.
|
||||
type Option struct {
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
)
|
||||
|
||||
// Error is custom error for additional features.
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package gerror
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
)
|
||||
|
||||
// Code returns the error code.
|
||||
|
||||
@ -13,8 +13,8 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/consts"
|
||||
"github.com/gogf/gf/v2/internal/errors"
|
||||
"github.com/gogf/gf/v3/internal/consts"
|
||||
"github.com/gogf/gf/v3/internal/errors"
|
||||
)
|
||||
|
||||
// stackInfo manages stack info of certain error.
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
)
|
||||
|
||||
func ExampleNewCode() {
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
// customError is used to test As function
|
||||
|
||||
Reference in New Issue
Block a user