2021-01-17 21:46:25 +08:00
|
|
|
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
|
2018-02-27 10:51:18 +08:00
|
|
|
//
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
2019-02-02 16:18:25 +08:00
|
|
|
// You can obtain one at https://github.com/gogf/gf.
|
2018-02-27 10:51:18 +08:00
|
|
|
|
2018-02-26 17:05:16 +08:00
|
|
|
package g
|
|
|
|
|
2021-02-08 17:57:21 +08:00
|
|
|
import "github.com/gogf/gf/container/gvar"
|
2018-10-09 13:33:00 +08:00
|
|
|
|
2020-06-16 17:38:05 +08:00
|
|
|
// Var is a universal variable interface, like generics.
|
2019-06-19 09:06:52 +08:00
|
|
|
type Var = gvar.Var
|
2018-10-09 13:33:00 +08:00
|
|
|
|
2021-02-08 17:57:21 +08:00
|
|
|
// Frequently-used map alias.
|
|
|
|
type (
|
|
|
|
Map = map[string]interface{}
|
|
|
|
MapAnyAny = map[interface{}]interface{}
|
|
|
|
MapAnyStr = map[interface{}]string
|
|
|
|
MapAnyInt = map[interface{}]int
|
|
|
|
MapStrAny = map[string]interface{}
|
|
|
|
MapStrStr = map[string]string
|
|
|
|
MapStrInt = map[string]int
|
|
|
|
MapIntAny = map[int]interface{}
|
|
|
|
MapIntStr = map[int]string
|
|
|
|
MapIntInt = map[int]int
|
|
|
|
MapAnyBool = map[interface{}]bool
|
|
|
|
MapStrBool = map[string]bool
|
|
|
|
MapIntBool = map[int]bool
|
|
|
|
)
|
2018-04-20 23:23:42 +08:00
|
|
|
|
2021-02-08 17:57:21 +08:00
|
|
|
// Frequently-used slice alias.
|
|
|
|
type (
|
|
|
|
List = []Map
|
|
|
|
ListAnyAny = []MapAnyAny
|
|
|
|
ListAnyStr = []MapAnyStr
|
|
|
|
ListAnyInt = []MapAnyInt
|
|
|
|
ListStrAny = []MapStrAny
|
|
|
|
ListStrStr = []MapStrStr
|
|
|
|
ListStrInt = []MapStrInt
|
|
|
|
ListIntAny = []MapIntAny
|
|
|
|
ListIntStr = []MapIntStr
|
|
|
|
ListIntInt = []MapIntInt
|
|
|
|
ListAnyBool = []MapAnyBool
|
|
|
|
ListStrBool = []MapStrBool
|
|
|
|
ListIntBool = []MapIntBool
|
|
|
|
)
|
2018-12-16 22:22:07 +08:00
|
|
|
|
2021-02-08 17:57:21 +08:00
|
|
|
// Frequently-used slice alias.
|
|
|
|
type (
|
|
|
|
Slice = []interface{}
|
|
|
|
SliceAny = []interface{}
|
|
|
|
SliceStr = []string
|
|
|
|
SliceInt = []int
|
|
|
|
)
|
2019-06-21 22:23:07 +08:00
|
|
|
|
|
|
|
// Array is alias of Slice.
|
2021-02-08 17:57:21 +08:00
|
|
|
type (
|
|
|
|
Array = []interface{}
|
|
|
|
ArrayAny = []interface{}
|
|
|
|
ArrayStr = []string
|
|
|
|
ArrayInt = []int
|
|
|
|
)
|