| 74 | ) |
| 75 | |
| 76 | func (m ValueType) String() string { |
| 77 | switch m { |
| 78 | case NilType: |
| 79 | return "nil" |
| 80 | case ErrorType: |
| 81 | return "error" |
| 82 | case UnknownType: |
| 83 | return "unknown" |
| 84 | case ValueInterfaceType: |
| 85 | return "value" |
| 86 | case NumberType: |
| 87 | return "number" |
| 88 | case IntType: |
| 89 | return "int" |
| 90 | case BoolType: |
| 91 | return "bool" |
| 92 | case TimeType: |
| 93 | return "time" |
| 94 | case ByteSliceType: |
| 95 | return "[]byte" |
| 96 | case StringType: |
| 97 | return "string" |
| 98 | case StringsType: |
| 99 | return "[]string" |
| 100 | case MapValueType: |
| 101 | return "map[string]value" |
| 102 | case MapIntType: |
| 103 | return "map[string]int" |
| 104 | case MapStringType: |
| 105 | return "map[string]string" |
| 106 | case MapNumberType: |
| 107 | return "map[string]number" |
| 108 | case MapTimeType: |
| 109 | return "map[string]time" |
| 110 | case MapBoolType: |
| 111 | return "map[string]bool" |
| 112 | case SliceValueType: |
| 113 | return "[]value" |
| 114 | case StructType: |
| 115 | return "struct" |
| 116 | case JsonType: |
| 117 | return "json" |
| 118 | default: |
| 119 | return "invalid" |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | func (m ValueType) IsMap() bool { |
| 124 | switch m { |