MCPcopy Index your code
hub / github.com/google/go-github / parseOpName

Function parseOpName

tools/metadata/metadata.go:107–117  ·  view source on GitHub ↗
(id string)

Source from the content-addressed store, hash-verified

105var opNameRe = regexp.MustCompile(`(?i)(\S+)(?:\s+(\S.*))?`)
106
107func parseOpName(id string) (verb, url string) {
108 match := opNameRe.FindStringSubmatch(id)
109 if match == nil {
110 return "", ""
111 }
112 u := strings.TrimSpace(match[2])
113 if !strings.HasPrefix(u, "/") {
114 u = "/" + u
115 }
116 return strings.ToUpper(match[1]), u
117}
118
119type operationsFile struct {
120 ManualOps []*operation `yaml:"operations,omitempty"`

Callers 2

sortOperationsFunction · 0.85
normalizedOpNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…