MCPcopy Index your code
hub / github.com/coder/coder / findSwaggerCommentByMethodAndRoute

Function findSwaggerCommentByMethodAndRoute

coderd/coderdtest/swaggerparser.go:273–280  ·  view source on GitHub ↗
(comments []SwaggerComment, method, route string)

Source from the content-addressed store, hash-verified

271}
272
273func findSwaggerCommentByMethodAndRoute(comments []SwaggerComment, method, route string) *SwaggerComment {
274 for _, c := range comments {
275 if c.method == method && c.router == route {
276 return &c
277 }
278 }
279 return nil
280}
281
282var nonAlphanumericRegex = regexp.MustCompile(`[^a-zA-Z0-9-]+`)
283

Callers 1

VerifySwaggerDefinitionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected