(key string)
| 51 | } |
| 52 | |
| 53 | func (m StringMap) Get(key string) (any, error) { |
| 54 | val, ok := m[key] |
| 55 | if !ok { |
| 56 | return nil, fmt.Errorf("%w: %s", errKeyNotFound, key) |
| 57 | } |
| 58 | |
| 59 | return val, nil |
| 60 | } |
| 61 | |
| 62 | // AsFloat is a helper function that extracts a float from the map. |
| 63 | // This function will convert number values such as int, uint, and float to float64. |
no outgoing calls