MCPcopy Create free account
hub / github.com/cli/cli / parseField

Function parseField

pkg/cmd/workflow/run/run.go:149–155  ·  view source on GitHub ↗

TODO copypasta from gh api

(f string)

Source from the content-addressed store, hash-verified

147
148// TODO copypasta from gh api
149func parseField(f string) (string, string, error) {
150 idx := strings.IndexRune(f, '=')
151 if idx == -1 {
152 return f, "", fmt.Errorf("field %q requires a value separated by an '=' sign", f)
153 }
154 return f[0:idx], f[idx+1:], nil
155}
156
157// TODO MODIFIED copypasta from gh api
158func magicFieldValue(v string, opts RunOptions) (string, error) {

Callers 2

parseFieldsFunction · 0.85
parseFieldsFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected