MCPcopy Create free account
hub / github.com/amp-labs/connectors / Get

Method Get

common/stringMap.go:53–60  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

51}
52
53func (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.

Callers 8

AsFloatMethod · 0.95
AsIntMethod · 0.95
GetStringMethod · 0.95
GetBoolMethod · 0.95
GetIntMethod · 0.95
GetFloatMethod · 0.95
GetNumberMethod · 0.95
TestStringMapFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestStringMapFunction · 0.76