AsMap is a utility function for converting Values to a map[string]interface{}. It protects against nil map panics.
()
| 65 | // |
| 66 | // It protects against nil map panics. |
| 67 | func (v Values) AsMap() map[string]any { |
| 68 | if len(v) == 0 { |
| 69 | return map[string]any{} |
| 70 | } |
| 71 | return v |
| 72 | } |
| 73 | |
| 74 | // Encode writes serialized Values information to the given io.Writer. |
| 75 | func (v Values) Encode(w io.Writer) error { |
no outgoing calls