type(
Var = gvar.Var//是一个通用的变量,类似泛型
Ctx = context.Context//context.Context的别名
)//Map是对原生map的key value约定好了类型,起了别名
type(
Map = map[string]interface{}
MapAnyAny = map[interface{}]interface{}// MapAnyAny is alias of frequently-used map type map[interface{}]interface{}.
MapAnyStr = map[interface{}]string // MapAnyStr is alias of frequently-used map type map[interface{}]string.
MapAnyInt = map[interface{}]int// MapAnyInt is alias of frequently-used map type map[interface{}]int.
MapStrAny = map[string]interface{}// MapStrAny is alias of frequently-used map type map[string]interface{}.
MapStrStr = map[string]string // MapStrStr is alias of frequently-used map type map[string]string.
MapStrInt = map[string]int// MapStrInt is alias of frequently-used map type map[string]int.
MapIntAny = map[int]interface{}// MapIntAny is alias of frequently-used map type map[int]interface{}.
.
.
.
)//List是map类型的切片
type (
List =[]Map
ListAnyAny =[]MapAnyAny // ListAnyAny is alias of frequently-used slice type []MapAnyAny.
ListAnyStr =[]MapAnyStr // ListAnyStr is alias of frequently-used slice type []MapAnyStr.
ListAnyInt =[]MapAnyInt // ListAnyInt is alias of frequently-used slice type []MapAnyInt.
ListStrAny =[]MapStrAny // ListStrAny is alias of frequently-used slice type []MapStrAny.
ListStrStr =[]MapStrStr // ListStrStr is alias of frequently-used slice type []MapStrStr.
ListStrInt =[]MapStrInt // ListStrInt is alias of frequently-used
.
.
.
)//Slice就是切片的别名
type(
Slice =[]interface{}// Slice is alias of frequently-used slice type []interface{}.
SliceAny =[]interface{}// SliceAny is alias of frequently-used slice type []interface{}.
SliceStr =[]string // SliceStr is alias of frequently-used slice type []string.
SliceInt =[]int// SliceInt is alias of frequently-used slice type []int.
)//Array也是切片的别名,猜测是为了迎合PHP转go的使用习惯,PHP的array和golang的切片更像,因为go的数组的固定长度的。
type(
Array =[]interface{}// Array is alias of frequently-used slice type []interface{}.
ArrayAny =[]interface{}// ArrayAny is alias of frequently-used slice type []interface{}.
ArrayStr =[]string // ArrayStr is alias of frequently-used slice type []string.
ArrayInt =[]int// ArrayInt is alias of frequently-used slice type []int.
)