Analyzer::Go::Gin
Inherits Analyzer::Go::GoEngine < Analyzer::Go::GoTestPath < Analyzer < FileHelper < Reference < Object
Constants
BIND_CALL = /\.(?:Must|Should)?Bind(JSON|Query|Header|Uri|With|BodyWith|BodyWithJSON)?\s*\(\s*&?\s*([A-Za-z_]\w*)\s*(?:,\s*binding\.(\w+)\s*)?\)/
c.ShouldBindJSON(&req), c.MustBindWith(params, binding.Query).
BIND_KIND_TAGS = {"default" => ["json", "form"] of ::String, "json" => ["json"] of ::String, "query" => ["form"] of ::String, "form" => ["form"] of ::String, "uri" => ["uri"] of ::String, "header" => ["header"] of ::String}
The struct tags each binder reads.
BINDING_KINDS = {"JSON" => "json", "Query" => "query", "Form" => "form", "FormPost" => "form", "FormMultipart" => "form", "Uri" => "uri", "Header" => "header"}
The binder a binding.X argument names.
BUILDER_TYPE = "*gin.RouterGroup"
IMPORT_MARKER = "github.com/gin-gonic/gin"
TAG_KEYS = (["json", "form", "uri", "header"] of ::String).to_h do |key| {key, /(?:\A|\s)#{key}:"/} end
Class methods
tech_name
SourceInstance methods
analyze
Sourcetech
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.