Array
Introduction
Array container that provides regular arrays and sorted arrays, supporting data item uniqueness correction and concurrency-safe toggle control.
Application Scenarios :
Array operations.
Usage :
import "github.com/gogf/gf/v2/container/garray"
Interface Documentation :
https://pkg.go.dev/github.com/gogf/gf/v2/container/garray
Brief Description:
- There are many objects and methods under the
garraymodule, so it is recommended to look carefully at the interface documentation. garraysupports the three common data types:int,string,interface{}.garraysupports both regular arrays and sorted arrays. The structure name of a regular array is defined in the format*Array, and the structure name of a sorted array is defined in the formatSorted*Array, as follows:Array,intArray,StrArraySortedArray,SortedIntArray,SortedStrArray- Among them, the sorted array
SortedArrayrequires a given sorting comparison method, and manyComparator*comparison methods are also defined in the toolkitgutil.
