MCPcopy Create free account
hub / github.com/github/gh-aw / parseYAMLMapKey

Function parseYAMLMapKey

pkg/cli/codemod_steps_run_secrets_env.go:492–501  ·  view source on GitHub ↗
(trimmedLine string)

Source from the content-addressed store, hash-verified

490}
491
492func parseYAMLMapKey(trimmedLine string) string {
493 if strings.HasPrefix(trimmedLine, "- ") {
494 return ""
495 }
496 parts := strings.SplitN(trimmedLine, ":", 2)
497 if len(parts) < 2 {
498 return ""
499 }
500 return strings.TrimSpace(parts[0])
501}

Calls

no outgoing calls

Tested by

no test coverage detected