structpkg

package
v0.0.0-...-d31700d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var Struct = Rule{

	FieldName: namepkg.Rule{
		MaxLen: 30,
		Style:  "camelCase",
	},
	Size: sizeRule{
		MaxFields: 100,
	},
	// contains filtered or unexported fields
}

Functions

func Check

func Check(node ast.Node, fileSet *token.FileSet)
Example
var src = `package example
type T struct {
  Name string
  A, B, C int
}
`
problems.Clear()
w := walker.Parse("example.go", src)
w.Walk(func(isLocal bool, node ast.Node) {
	Check(node, w.FileSet)
})
problems.Render()
Output:

Types

type Rule

type Rule struct {
	FieldName namepkg.Rule `yaml:"fieldName"`
	Size      sizeRule
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL