g.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
  2. //
  3. // This Source Code Form is subject to the terms of the MIT License.
  4. // If a copy of the MIT was not distributed with this file,
  5. // You can obtain one at https://github.com/gogf/gf.
  6. package g
  7. import (
  8. "context"
  9. "github.com/gogf/gf/container/gvar"
  10. )
  11. type (
  12. Var = gvar.Var // Var is a universal variable interface, like generics.
  13. Ctx = context.Context // Ctx is alias of frequently-used context.Context.
  14. )
  15. type (
  16. Map = map[string]interface{} // Map is alias of frequently-used map type map[string]interface{}.
  17. MapAnyAny = map[interface{}]interface{} // MapAnyAny is alias of frequently-used map type map[interface{}]interface{}.
  18. MapAnyStr = map[interface{}]string // MapAnyStr is alias of frequently-used map type map[interface{}]string.
  19. MapAnyInt = map[interface{}]int // MapAnyInt is alias of frequently-used map type map[interface{}]int.
  20. MapStrAny = map[string]interface{} // MapStrAny is alias of frequently-used map type map[string]interface{}.
  21. MapStrStr = map[string]string // MapStrStr is alias of frequently-used map type map[string]string.
  22. MapStrInt = map[string]int // MapStrInt is alias of frequently-used map type map[string]int.
  23. MapIntAny = map[int]interface{} // MapIntAny is alias of frequently-used map type map[int]interface{}.
  24. MapIntStr = map[int]string // MapIntStr is alias of frequently-used map type map[int]string.
  25. MapIntInt = map[int]int // MapIntInt is alias of frequently-used map type map[int]int.
  26. MapAnyBool = map[interface{}]bool // MapAnyBool is alias of frequently-used map type map[interface{}]bool.
  27. MapStrBool = map[string]bool // MapStrBool is alias of frequently-used map type map[string]bool.
  28. MapIntBool = map[int]bool // MapIntBool is alias of frequently-used map type map[int]bool.
  29. )
  30. type (
  31. List = []Map // List is alias of frequently-used slice type []Map.
  32. ListAnyAny = []MapAnyAny // ListAnyAny is alias of frequently-used slice type []MapAnyAny.
  33. ListAnyStr = []MapAnyStr // ListAnyStr is alias of frequently-used slice type []MapAnyStr.
  34. ListAnyInt = []MapAnyInt // ListAnyInt is alias of frequently-used slice type []MapAnyInt.
  35. ListStrAny = []MapStrAny // ListStrAny is alias of frequently-used slice type []MapStrAny.
  36. ListStrStr = []MapStrStr // ListStrStr is alias of frequently-used slice type []MapStrStr.
  37. ListStrInt = []MapStrInt // ListStrInt is alias of frequently-used slice type []MapStrInt.
  38. ListIntAny = []MapIntAny // ListIntAny is alias of frequently-used slice type []MapIntAny.
  39. ListIntStr = []MapIntStr // ListIntStr is alias of frequently-used slice type []MapIntStr.
  40. ListIntInt = []MapIntInt // ListIntInt is alias of frequently-used slice type []MapIntInt.
  41. ListAnyBool = []MapAnyBool // ListAnyBool is alias of frequently-used slice type []MapAnyBool.
  42. ListStrBool = []MapStrBool // ListStrBool is alias of frequently-used slice type []MapStrBool.
  43. ListIntBool = []MapIntBool // ListIntBool is alias of frequently-used slice type []MapIntBool.
  44. )
  45. type (
  46. Slice = []interface{} // Slice is alias of frequently-used slice type []interface{}.
  47. SliceAny = []interface{} // SliceAny is alias of frequently-used slice type []interface{}.
  48. SliceStr = []string // SliceStr is alias of frequently-used slice type []string.
  49. SliceInt = []int // SliceInt is alias of frequently-used slice type []int.
  50. )
  51. type (
  52. Array = []interface{} // Array is alias of frequently-used slice type []interface{}.
  53. ArrayAny = []interface{} // ArrayAny is alias of frequently-used slice type []interface{}.
  54. ArrayStr = []string // ArrayStr is alias of frequently-used slice type []string.
  55. ArrayInt = []int // ArrayInt is alias of frequently-used slice type []int.
  56. )