MCPcopy Create free account
hub / github.com/goadesign/goa / ExtractHTTPWildcards

Function ExtractHTTPWildcards

expr/http.go:44–51  ·  view source on GitHub ↗

ExtractHTTPWildcards returns the names of the wildcards that appear in a HTTP path.

(path string)

Source from the content-addressed store, hash-verified

42// ExtractHTTPWildcards returns the names of the wildcards that appear in
43// a HTTP path.
44func ExtractHTTPWildcards(path string) []string {
45 matches := HTTPWildcardRegex.FindAllStringSubmatch(path, -1)
46 wcs := make([]string, len(matches))
47 for i, m := range matches {
48 wcs[i] = m[1]
49 }
50 return wcs
51}
52
53// Service returns the service with the given name if any.
54func (h *HTTPExpr) Service(name string) *HTTPServiceExpr {

Callers 8

analyzeMethod · 0.92
toSchemaHrefsFunction · 0.92
paramsFromExprFunction · 0.92
buildPathFromFileServerFunction · 0.92
buildFileServerOperationFunction · 0.92
paramsFromPathFunction · 0.92
PathFunction · 0.92
ParamsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected