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

Function parseLogsActor

internal/cli/logs.go:108–118  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

106}
107
108func parseLogsActor(raw string) (string, string, error) {
109 value := strings.TrimSpace(raw)
110 if value == "" {
111 return "", "", nil
112 }
113 kind, id, ok := strings.Cut(value, ":")
114 if !ok || strings.TrimSpace(kind) == "" || strings.TrimSpace(id) == "" {
115 return "", "", fmt.Errorf("cli: actor must use kind:id format")
116 }
117 return strings.TrimSpace(kind), strings.TrimSpace(id), nil
118}
119
120func writeLogsOutput(cmd *cobra.Command, events []LogEventRecord) error {
121 mode, err := resolveOutputFormat(cmd)

Callers 1

newLogsCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected