Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HandlerAnalyzer = &analysis.Analyzer{ Name: "hanlderAnalyzer", Doc: doc, Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
HandlerAnalyzer analyzes handlers and get handler information.
Functions ¶
func GenerateAllTests ¶
func GenerateAllTests(handlersInfo []*HandlerInfo)
GenerateAllTests generates all tests.
Types ¶
type HandlerInfo ¶
type HandlerInfo struct {
Pkg Package // Included pacakge
File string // Included file name
Name string // Handler name
URL string // Endpoint url
Method string // Request method
IsHandlerFunc bool
IsFuncLit bool
IsFuncDecl bool
IsNew bool
IsInstance bool
}
HandlerInfo includes information of handler.
func NewHandlerInfo ¶
func NewHandlerInfo(pkgName string, pkgPath string) *HandlerInfo
NewHandlerInfo initializes HandlerInfo.
type PkgAndImpTmplData ¶
Click to show internal directories.
Click to hide internal directories.