MCPcopy Create free account
hub / github.com/BryanMwangi/pine / buildParams

Function buildParams

router.go:289–300  ·  view source on GitHub ↗

buildParams zips paramNames with captured values into a map.

(names, values []string)

Source from the content-addressed store, hash-verified

287
288// buildParams zips paramNames with captured values into a map.
289func buildParams(names, values []string) map[string]string {
290 if len(names) == 0 {
291 return make(map[string]string)
292 }
293 params := make(map[string]string, len(names))
294 for i, name := range names {
295 if i < len(values) {
296 params[name] = values[i]
297 }
298 }
299 return params
300}

Callers 2

searchMethod · 0.85
searchAnyMethodMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected