MCPcopy Create free account
hub / github.com/compozy/agh / parseNetworkJSONValue

Function parseNetworkJSONValue

internal/cli/network.go:1941–1950  ·  view source on GitHub ↗
(flagName string, raw string)

Source from the content-addressed store, hash-verified

1939}
1940
1941func parseNetworkJSONValue(flagName string, raw string) (json.RawMessage, error) {
1942 payload, err := parseRequiredJSONRawMessage(raw)
1943 if errors.Is(err, errEmptyJSONFlag) {
1944 return nil, fmt.Errorf("cli: %s is required", flagName)
1945 }
1946 if err != nil {
1947 return nil, fmt.Errorf("cli: %s must be valid JSON: %w", flagName, err)
1948 }
1949 return payload, nil
1950}
1951
1952func parseNetworkJSONObjectMap(flagName string, raw string) (map[string]json.RawMessage, error) {
1953 trimmed := strings.TrimSpace(raw)

Callers 3

newChannelSendCommandFunction · 0.85
newChannelReplyCommandFunction · 0.85
newNetworkSendCommandFunction · 0.85

Calls 2

IsMethod · 0.45

Tested by

no test coverage detected