MCPcopy Create free account
hub / github.com/hashicorp/vault / jsonNumberOK

Function jsonNumberOK

command/operator_usage.go:211–221  ·  view source on GitHub ↗
(m map[string]interface{}, key string)

Source from the content-addressed store, hash-verified

209}
210
211func jsonNumberOK(m map[string]interface{}, key string) (int64, bool) {
212 val, ok := m[key].(json.Number)
213 if !ok {
214 return 0, false
215 }
216 intVal, err := val.Int64()
217 if err != nil {
218 return 0, false
219 }
220 return intVal, true
221}
222
223// TODO: provide a function in the API module for doing this conversion?
224func (c *OperatorUsageCommand) parseNamespaceCount(rawVal interface{}) (UsageResponse, error) {

Callers 2

parseNamespaceCountMethod · 0.85
totalOutputMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…