MCPcopy Create free account
hub / github.com/larksuite/cli / parseJSONArray

Function parseJSONArray

shortcuts/base/helpers.go:53–63  ·  view source on GitHub ↗
(pc *parseCtx, raw string, flagName string)

Source from the content-addressed store, hash-verified

51}
52
53func parseJSONArray(pc *parseCtx, raw string, flagName string) ([]interface{}, error) {
54 resolved, err := loadJSONInput(pc, raw, flagName)
55 if err != nil {
56 return nil, err
57 }
58 var result []interface{}
59 if err := common.ParseJSON([]byte(resolved), &result); err != nil {
60 return nil, formatJSONError(flagName, "array", err)
61 }
62 return result, nil
63}
64
65func parseStringListFlexible(pc *parseCtx, raw string, flagName string) ([]string, error) {
66 raw = strings.TrimSpace(raw)

Callers 4

TestParseHelpersFunction · 0.85
parseObjectListFunction · 0.85
buildTableCreateBodyFunction · 0.85
dryRunTableCreateBodyFunction · 0.85

Calls 3

ParseJSONFunction · 0.92
loadJSONInputFunction · 0.85
formatJSONErrorFunction · 0.85

Tested by 1

TestParseHelpersFunction · 0.68