class

Analyzer::Go::Http

Inherits Analyzer::Go::GoEngine < Analyzer::Go::GoTestPath < Analyzer < FileHelper < Reference < Object

Constants

FUNC_WITH_PARAMS = /^func\s+(?:\([^)]*\)\s*)?(\w+)\s*\(([^)]*)\)/m

func (s *S) RegisterRoutes(mux *http.ServeMux, ...): the head and its parameter list.

IMPORT_MARKER = "net/http"
ROUTE_METHODS = ["HandleFunc", "Handle"]

Registration calls that make a file worth the route parse.

ROUTER_CALL_METHODS = /\.(?:GET|POST|PUT|PATCH|DELETE|HEAD|OPTIONS|Any|Handle|HandleFunc|Group|Use|Get|Post|Put|Patch|Delete|Route|Mount)\s*\(/

Class methods

tech_name
Source

Instance methods

analyze
Source
get_param(line : String, pattern : String, endpoint : Endpoint | Nil = nil) : Param
Source
tech

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.

Source