Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LocalType = Rule{ Rule: name.Rule{ MaxLen: 30, Style: "lowerCamelCase", }, // contains filtered or unexported fields }
View Source
var Type = Rule{ Rule: name.Rule{ MaxLen: 40, Style: "camelCase", }, // contains filtered or unexported fields }
Functions ¶
func Check ¶
Example ¶
var src = `package example type T int func F() { type TypeName int } ` problems.Clear() w := walker.Parse("example.go", src) w.Walk(func(isLocal bool, node ast.Node) { Check(isLocal, node, w.FileSet) }) problems.Render()
Output: +----------------+---------------------------------------------------------+-----------------+ | position | problem | rule | +----------------+---------------------------------------------------------+-----------------+ | example.go:4:8 | local type name TypeName should be lowerCamelCase style | localType.style | +----------------+---------------------------------------------------------+-----------------+
Types ¶
Click to show internal directories.
Click to hide internal directories.