class
Analyzer::Go::Hertz
- Analyzer::Go::Hertz
- Analyzer::Go::GoEngine
- Analyzer
- Reference
- Object
Defined in:
analyzer/analyzers/go/hertz.crConstant Summary
-
HTTP_METHODS_ALLOWED =
(HTTP_METHODS_EXPANDED + (["TRACE", "CONNECT", "QUERY", "ANY"] of ::String)).to_set -
HTTP_METHODS_EXPANDED =
["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"] of ::String -
Hertz (https://github.com/cloudwego/hertz) mirrors Gin's routing API: h := server.Default() h.GET("/ping", handler) h.Any("/path", handler) -- expands to all HTTP methods g := h.Group("/api/v1"); g.GET(...) and uses the same parameter accessors on the RequestContext: ctx.Query / DefaultQuery / PostForm / DefaultPostForm / GetHeader / Cookie
-
IMPORT_MARKER =
"github.com/cloudwego/hertz" -
PARAM_ACCESSOR_RE =
/(?:DefaultQuery|DefaultPostForm|Query|PostForm|GetHeader|Param|FormValue)\s*\(\s*"?([^",\s\)]+)"?/ -
Regex-based extraction so nested calls (e.g.
fmt.Println(ctx.Query("x"))) and whitespace variants still yield the right param name, and so the param-type derivation stays in one place.