mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
v2 -> v3
This commit is contained in:
@ -12,15 +12,15 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/grand"
|
||||
)
|
||||
|
||||
// Array is a golang array with rich features.
|
||||
|
||||
@ -12,12 +12,12 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
"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/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"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/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/grand"
|
||||
)
|
||||
|
||||
// IntArray is a golang int array with rich features.
|
||||
|
||||
@ -12,13 +12,13 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"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/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"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/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/grand"
|
||||
)
|
||||
|
||||
// StrArray is a golang string array with rich features.
|
||||
|
||||
@ -12,14 +12,14 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/grand"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
// SortedArray is a golang sorted array with rich features.
|
||||
|
||||
@ -12,10 +12,10 @@ import (
|
||||
"math"
|
||||
"sort"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/grand"
|
||||
)
|
||||
|
||||
// SortedIntArray is a golang sorted int array with rich features.
|
||||
|
||||
@ -12,11 +12,11 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/grand"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/grand"
|
||||
)
|
||||
|
||||
// SortedStrArray is a golang sorted string array with rich features.
|
||||
|
||||
@ -9,7 +9,7 @@ package garray_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
)
|
||||
|
||||
type anySortedArrayItem struct {
|
||||
|
||||
@ -9,9 +9,9 @@ package garray_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
)
|
||||
|
||||
func ExampleNew() {
|
||||
|
||||
@ -9,11 +9,11 @@ package garray_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleIntArray_Walk() {
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleStrArray_Walk() {
|
||||
|
||||
@ -9,11 +9,11 @@ package garray_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleSortedStrArray_Walk() {
|
||||
|
||||
@ -12,10 +12,10 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func Test_Array_Var(t *testing.T) {
|
||||
|
||||
@ -12,12 +12,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_Array_Basic(t *testing.T) {
|
||||
|
||||
@ -12,12 +12,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_IntArray_Basic(t *testing.T) {
|
||||
|
||||
@ -13,12 +13,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_StrArray_Basic(t *testing.T) {
|
||||
|
||||
@ -13,13 +13,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"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/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func TestSortedArray_NewSortedArrayFrom(t *testing.T) {
|
||||
|
||||
@ -12,12 +12,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func TestNewSortedIntArrayComparator(t *testing.T) {
|
||||
|
||||
@ -12,13 +12,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func TestNewSortedStrArrayComparator(t *testing.T) {
|
||||
|
||||
@ -13,10 +13,10 @@ import (
|
||||
"bytes"
|
||||
"container/list"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
type (
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"container/list"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/glist"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/glist"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
)
|
||||
|
||||
func ExampleNew() {
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"container/list"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func checkListLen(t *gtest.T, l *List, len int) bool {
|
||||
|
||||
@ -9,12 +9,12 @@ package gmap
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// AnyAnyMap wraps map type `map[interface{}]interface{}` and provides more map features.
|
||||
|
||||
@ -10,12 +10,12 @@ package gmap
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// IntAnyMap implements map[int]interface{} with RWMutex that has switch.
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
package gmap
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// IntIntMap implements map[int]int with RWMutex that has switch.
|
||||
|
||||
@ -7,10 +7,10 @@
|
||||
package gmap
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// IntStrMap implements map[int]string with RWMutex that has switch.
|
||||
|
||||
@ -10,12 +10,12 @@ package gmap
|
||||
import (
|
||||
"reflect"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// StrAnyMap implements map[string]interface{} with RWMutex that has switch.
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
package gmap
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// StrIntMap implements map[string]int with RWMutex that has switch.
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
package gmap
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// StrStrMap implements map[string]string with RWMutex that has switch.
|
||||
|
||||
@ -10,13 +10,13 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/glist"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/empty"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/glist"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/empty"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// ListMap is a map that preserves insertion-order.
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
package gmap
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
)
|
||||
|
||||
// TreeMap based on red-black tree, alias of RedBlackTree.
|
||||
|
||||
@ -9,9 +9,9 @@ package gmap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func getValue() interface{} {
|
||||
|
||||
@ -11,8 +11,8 @@ package gmap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
var hashMap = gmap.New(true)
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
)
|
||||
|
||||
var anyAnyMap = gmap.NewAnyAnyMap(true)
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
)
|
||||
|
||||
var gm = gmap.NewIntIntMap(true)
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
)
|
||||
|
||||
var anyAnyMapUnsafe = gmap.New()
|
||||
|
||||
@ -9,10 +9,10 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleAnyAnyMap_Iterator() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleIntAnyMap_Iterator() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleIntIntMap_Iterator() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleListMap_Iterator() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleStrAnyMap_Iterator() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleStrIntMap_Iterator() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func ExampleStrStrMap_Iterator() {
|
||||
|
||||
@ -9,8 +9,8 @@ package gmap_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func ExampleNew() {
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_AnyAnyMap_Var(t *testing.T) {
|
||||
|
||||
@ -9,12 +9,12 @@ package gmap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func getAny() interface{} {
|
||||
|
||||
@ -9,12 +9,12 @@ package gmap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func getInt() int {
|
||||
|
||||
@ -9,12 +9,12 @@ package gmap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func getStr() string {
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_StrAnyMap_Var(t *testing.T) {
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_StrIntMap_Var(t *testing.T) {
|
||||
|
||||
@ -10,12 +10,12 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_StrStrMap_Var(t *testing.T) {
|
||||
|
||||
@ -9,12 +9,12 @@ package gmap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func Test_ListMap_Var(t *testing.T) {
|
||||
|
||||
@ -9,12 +9,12 @@ package gmap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gmap"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gmap"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func Test_TreeMap_Var(t *testing.T) {
|
||||
|
||||
@ -11,12 +11,12 @@ import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/glist"
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"github.com/gogf/gf/v2/os/gtimer"
|
||||
"github.com/gogf/gf/v3/container/glist"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
"github.com/gogf/gf/v3/errors/gcode"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/os/gtime"
|
||||
"github.com/gogf/gf/v3/os/gtimer"
|
||||
)
|
||||
|
||||
// Pool is an Object-Reusable Pool.
|
||||
|
||||
@ -13,7 +13,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gpool"
|
||||
"github.com/gogf/gf/v3/container/gpool"
|
||||
)
|
||||
|
||||
var pool = gpool.New(time.Hour, nil)
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gpool"
|
||||
"github.com/gogf/gf/v3/container/gpool"
|
||||
)
|
||||
|
||||
func ExampleNew() {
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gpool"
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/container/gpool"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
var nf gpool.NewFunc = func() (i interface{}, e error) {
|
||||
|
||||
@ -20,8 +20,8 @@ package gqueue
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/gogf/gf/v2/container/glist"
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v3/container/glist"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
)
|
||||
|
||||
// Queue is a concurrent-safe queue built on doubly linked list and channel.
|
||||
|
||||
@ -11,7 +11,7 @@ package gqueue_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gqueue"
|
||||
"github.com/gogf/gf/v3/container/gqueue"
|
||||
)
|
||||
|
||||
var bn = 20000000
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gqueue"
|
||||
"github.com/gogf/gf/v2/os/gtimer"
|
||||
"github.com/gogf/gf/v3/container/gqueue"
|
||||
"github.com/gogf/gf/v3/os/gtimer"
|
||||
)
|
||||
|
||||
func ExampleNew() {
|
||||
|
||||
@ -12,8 +12,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gqueue"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/container/gqueue"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
func TestQueue_Len(t *testing.T) {
|
||||
|
||||
@ -12,8 +12,8 @@ package gring
|
||||
import (
|
||||
"container/ring"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
)
|
||||
|
||||
// Ring is a struct of ring structure.
|
||||
|
||||
@ -11,7 +11,7 @@ package gring_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gring"
|
||||
"github.com/gogf/gf/v3/container/gring"
|
||||
)
|
||||
|
||||
var length = 10000
|
||||
|
||||
@ -9,7 +9,7 @@ package gring_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gring"
|
||||
"github.com/gogf/gf/v3/container/gring"
|
||||
)
|
||||
|
||||
func ExampleNew() {
|
||||
|
||||
@ -10,9 +10,9 @@ import (
|
||||
"container/ring"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gring"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v3/container/gring"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
)
|
||||
|
||||
type Student struct {
|
||||
|
||||
@ -10,10 +10,10 @@ package gset
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Set is consisted of interface{} items.
|
||||
|
||||
@ -10,9 +10,9 @@ package gset
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// IntSet is consisted of int items.
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
"bytes"
|
||||
"strings"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// StrSet is consisted of string items.
|
||||
|
||||
@ -12,7 +12,7 @@ import (
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
)
|
||||
|
||||
var intSet = gset.NewIntSet(true)
|
||||
|
||||
@ -9,8 +9,8 @@ package gset_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
)
|
||||
|
||||
func ExampleSet_Intersect() {
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
)
|
||||
|
||||
// New create and returns a new set, which contains un-repeated items.
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
)
|
||||
|
||||
// NewStrSet create and returns a new set, which contains un-repeated items.
|
||||
|
||||
@ -14,12 +14,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func TestSet_Var(t *testing.T) {
|
||||
|
||||
@ -14,12 +14,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func TestIntSet_Var(t *testing.T) {
|
||||
|
||||
@ -14,12 +14,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/container/garray"
|
||||
"github.com/gogf/gf/v2/container/gset"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/garray"
|
||||
"github.com/gogf/gf/v3/container/gset"
|
||||
"github.com/gogf/gf/v3/frame/g"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
func TestStrSet_Var(t *testing.T) {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
// Some implements are from: https://github.com/emirpasic/gods
|
||||
package gtree
|
||||
|
||||
import "github.com/gogf/gf/v2/container/gvar"
|
||||
import "github.com/gogf/gf/v3/container/gvar"
|
||||
|
||||
// iTree defines the interface for basic operations of a tree.
|
||||
type iTree interface {
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
|
||||
"github.com/emirpasic/gods/trees/avltree"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
var _ iTree = (*AVLTree)(nil)
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
|
||||
"github.com/emirpasic/gods/trees/btree"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
var _ iTree = (*BTree)(nil)
|
||||
|
||||
@ -11,12 +11,12 @@ import (
|
||||
|
||||
"github.com/emirpasic/gods/trees/redblacktree"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/internal/rwmutex"
|
||||
"github.com/gogf/gf/v2/text/gstr"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/internal/rwmutex"
|
||||
"github.com/gogf/gf/v3/text/gstr"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
var _ iTree = (*RedBlackTree)(nil)
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func Test_AVLTree_Basic(t *testing.T) {
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func Test_BTree_Basic(t *testing.T) {
|
||||
|
||||
@ -9,10 +9,10 @@ package gtree_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func ExampleAVLTree_Clone() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gtree_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func ExampleBTree_Clone() {
|
||||
|
||||
@ -9,10 +9,10 @@ package gtree_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func ExampleRedBlackTree_SetComparator() {
|
||||
|
||||
@ -9,9 +9,9 @@ package gtree_test
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func ExampleNewAVLTree() {
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtree"
|
||||
"github.com/gogf/gf/v2/container/gvar"
|
||||
"github.com/gogf/gf/v2/test/gtest"
|
||||
"github.com/gogf/gf/v2/util/gutil"
|
||||
"github.com/gogf/gf/v3/container/gtree"
|
||||
"github.com/gogf/gf/v3/container/gvar"
|
||||
"github.com/gogf/gf/v3/test/gtest"
|
||||
"github.com/gogf/gf/v3/util/gutil"
|
||||
)
|
||||
|
||||
func getValue() interface{} {
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"bytes"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Bool is a struct for concurrent-safe operation for type bool.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Byte is a struct for concurrent-safe operation for type byte.
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"encoding/base64"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/errors/gerror"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Bytes is a struct for concurrent-safe operation for type []byte.
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Float32 is a struct for concurrent-safe operation for type float32.
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Float64 is a struct for concurrent-safe operation for type float64.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Int is a struct for concurrent-safe operation for type int.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Int32 is a struct for concurrent-safe operation for type int32.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Int64 is a struct for concurrent-safe operation for type int64.
|
||||
|
||||
@ -9,9 +9,9 @@ package gtype
|
||||
import (
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/internal/deepcopy"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/internal/deepcopy"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Interface is a struct for concurrent-safe operation for type interface{}.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"bytes"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// String is a struct for concurrent-safe operation for type string.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Uint is a struct for concurrent-safe operation for type uint.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Uint32 is a struct for concurrent-safe operation for type uint32.
|
||||
|
||||
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/gogf/gf/v2/util/gconv"
|
||||
"github.com/gogf/gf/v3/util/gconv"
|
||||
)
|
||||
|
||||
// Uint64 is a struct for concurrent-safe operation for type uint64.
|
||||
|
||||
@ -13,8 +13,8 @@ import (
|
||||
"sync/atomic"
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/encoding/gbinary"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
"github.com/gogf/gf/v3/encoding/gbinary"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -11,8 +11,8 @@ package gtype_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/gogf/gf/v2/container/gtype"
|
||||
"github.com/gogf/gf/v2/internal/json"
|
||||
"github.com/gogf/gf/v3/container/gtype"
|
||||
"github.com/gogf/gf/v3/internal/json"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user