MCPcopy
hub / github.com/grafana/dskit / Set

Method Set

flagext/map.go:42–48  ·  view source on GitHub ↗

Set implements flag.Value

(s string)

Source from the content-addressed store, hash-verified

40
41// Set implements flag.Value
42func (m LimitsMap[T]) Set(s string) error {
43 newMap := make(map[string]T)
44 if err := json.Unmarshal([]byte(s), &newMap); err != nil {
45 return err
46 }
47 return m.updateMap(newMap)
48}
49
50func (m LimitsMap[T]) Read() map[string]T {
51 return m.data

Callers

nothing calls this directly

Calls 2

updateMapMethod · 0.95
UnmarshalMethod · 0.45

Tested by

no test coverage detected