2019-02-02 16:18:25 +08:00
|
|
|
// Copyright 2017 gf Author(https://github.com/gogf/gf). 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
|
|
|
|
|
2019-09-23 19:25:03 +08:00
|
|
|
import (
|
|
|
|
"github.com/gogf/gf/container/gvar"
|
|
|
|
)
|
2018-10-09 13:33:00 +08:00
|
|
|
|
2019-09-23 19:25:03 +08:00
|
|
|
// Var is a universal variable type, like generics.
|
2019-06-19 09:06:52 +08:00
|
|
|
type Var = gvar.Var
|
2018-10-09 13:33:00 +08:00
|
|
|
|
2019-02-22 09:08:46 +08:00
|
|
|
// Frequently-used map type alias.
|
2019-06-19 09:06:52 +08:00
|
|
|
type Map = map[string]interface{}
|
|
|
|
type MapAnyAny = map[interface{}]interface{}
|
|
|
|
type MapAnyStr = map[interface{}]string
|
|
|
|
type MapAnyInt = map[interface{}]int
|
|
|
|
type MapStrAny = map[string]interface{}
|
|
|
|
type MapStrStr = map[string]string
|
|
|
|
type MapStrInt = map[string]int
|
|
|
|
type MapIntAny = map[int]interface{}
|
|
|
|
type MapIntStr = map[int]string
|
|
|
|
type MapIntInt = map[int]int
|
2019-09-05 14:25:20 +08:00
|
|
|
type MapAnyBool = map[interface{}]bool
|
|
|
|
type MapStrBool = map[string]bool
|
|
|
|
type MapIntBool = map[int]bool
|
2018-04-20 23:23:42 +08:00
|
|
|
|
2019-02-22 09:08:46 +08:00
|
|
|
// Frequently-used slice type alias.
|
2019-06-19 09:06:52 +08:00
|
|
|
type List = []Map
|
2019-10-14 23:27:48 +08:00
|
|
|
type ListAnyAny = []Map
|
|
|
|
type ListAnyStr = []MapAnyStr
|
|
|
|
type ListAnyInt = []MapAnyInt
|
|
|
|
type ListStrAny = []MapStrAny
|
|
|
|
type ListStrStr = []MapStrStr
|
|
|
|
type ListStrInt = []MapStrInt
|
|
|
|
type ListIntAny = []MapIntAny
|
|
|
|
type ListIntStr = []MapIntStr
|
|
|
|
type ListIntInt = []MapIntInt
|
|
|
|
type ListAnyBool = []MapAnyBool
|
|
|
|
type ListStrBool = []MapStrBool
|
|
|
|
type ListIntBool = []MapIntBool
|
2018-12-16 22:22:07 +08:00
|
|
|
|
2019-03-06 15:21:00 +08:00
|
|
|
// Frequently-used slice type alias.
|
2019-06-19 09:06:52 +08:00
|
|
|
type Slice = []interface{}
|
|
|
|
type SliceAny = []interface{}
|
|
|
|
type SliceStr = []string
|
|
|
|
type SliceInt = []int
|
2019-06-21 22:23:07 +08:00
|
|
|
|
|
|
|
// Array is alias of Slice.
|
2019-06-19 09:06:52 +08:00
|
|
|
type Array = []interface{}
|
|
|
|
type ArrayAny = []interface{}
|
|
|
|
type ArrayStr = []string
|
|
|
|
type ArrayInt = []int
|