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

Function splitPath

script/ghmock/restcheck.go:84–90  ·  view source on GitHub ↗
(p string)

Source from the content-addressed store, hash-verified

82}
83
84func splitPath(p string) []string {
85 p = strings.Trim(p, "/")
86 if p == "" {
87 return nil
88 }
89 return strings.Split(p, "/")
90}
91
92// match finds the documented path template for a request. Literal segments
93// beat parameters, so /repos/{owner}/{repo}/issues beats

Callers 2

parseTemplateFunction · 0.85
matchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected