MCPcopy Index your code
hub / github.com/cli/cli / parseField

Function parseField

pkg/cmd/workflow/run/run.go:148–154  ·  view source on GitHub ↗

TODO copypasta from gh api

(f string)

Source from the content-addressed store, hash-verified

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