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

Function parseArgsData

command/base_helpers.go:135–142  ·  view source on GitHub ↗

parseArgsData parses the given args in the format key=value into a map of the provided arguments. The given reader can also supply key=value pairs.

(stdin io.Reader, args []string)

Source from the content-addressed store, hash-verified

133// parseArgsData parses the given args in the format key=value into a map of
134// the provided arguments. The given reader can also supply key=value pairs.
135func parseArgsData(stdin io.Reader, args []string) (map[string]interface{}, error) {
136 builder := &kvbuilder.Builder{Stdin: stdin}
137 if err := builder.Add(args...); err != nil {
138 return nil, err
139 }
140
141 return builder.Map(), nil
142}
143
144// parseArgsDataString parses the args data and returns the values as strings.
145// If the values cannot be represented as strings, an error is returned.

Callers 10

RunMethod · 0.85
RunMethod · 0.85
parseArgsDataStringFunction · 0.85
parseArgsDataStringListsFunction · 0.85
RunMethod · 0.85
TestParseArgsDataFunction · 0.85
ImportKeyFunction · 0.85
RunMethod · 0.85
RunMethod · 0.85
RunMethod · 0.85

Calls 2

AddMethod · 0.65
MapMethod · 0.45

Tested by 1

TestParseArgsDataFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…