String returns a readable representation of this value (for usage defaults)
()
| 92 | |
| 93 | // String returns a readable representation of this value (for usage defaults) |
| 94 | func (i *MapBase[T, C, VC]) String() string { |
| 95 | v := i.Value() |
| 96 | var t T |
| 97 | if reflect.TypeOf(t).Kind() == reflect.String { |
| 98 | return fmt.Sprintf("%v", v) |
| 99 | } |
| 100 | return fmt.Sprintf("%T{%s}", v, i.ToString(v)) |
| 101 | } |
| 102 | |
| 103 | // Serialize allows MapBase to fulfill Serializer |
| 104 | func (i *MapBase[T, C, VC]) Serialize() string { |