analyzer

package
v2.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

View Source
const (
	TagName          = "exhaustruct"
	OptionalTagValue = "optional"
)

Variables

View Source
var (
	ErrEmptyPattern = errors.New("pattern can't be empty")
)

Functions

func NewAnalyzer added in v2.1.0

func NewAnalyzer(include []string, exclude []string) (*analysis.Analyzer, error)

NewAnalyzer returns a go/analysis-compatible analyzer.

-i arguments adds include patterns
-e arguments adds exclude patterns

Types

type PatternsList

type PatternsList []*regexp.Regexp

func (PatternsList) MatchesAny

func (l PatternsList) MatchesAny(str string) bool

MatchesAny matches provided string against all regexps in a slice.

type StructFields added in v2.2.0

type StructFields struct {
	All         []string
	AllRequired []string

	Public         []string
	PublicRequired []string
}

func NewStructFields added in v2.2.0

func NewStructFields(strct *types.Struct) *StructFields

Jump to

Keyboard shortcuts

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