Skip to content

Commit

Permalink
style: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xobotyi committed Mar 6, 2023
1 parent 53f9eea commit 1a03bf9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@ import (
)

type analyzer struct {
include pattern.List
exclude pattern.List
include pattern.List `exhaustruct:"optional"`
exclude pattern.List `exhaustruct:"optional"`

fieldsCache map[types.Type]fields.StructFields
fieldsCacheMu sync.RWMutex
fieldsCacheMu sync.RWMutex `exhaustruct:"optional"`

typeProcessingNeed map[types.Type]bool
typeProcessingNeedMu sync.RWMutex
typeProcessingNeedMu sync.RWMutex `exhaustruct:"optional"`
}

func NewAnalyzer(include, exclude []string) (an *analysis.Analyzer, err error) {
a := analyzer{ //nolint:exhaustruct
func NewAnalyzer(include, exclude []string) (*analysis.Analyzer, error) {
a := analyzer{
fieldsCache: make(map[types.Type]fields.StructFields),
typeProcessingNeed: make(map[types.Type]bool),
}

var err error

a.include, err = pattern.NewList(include...)
if err != nil {
return nil, err //nolint:wrapcheck
Expand Down

0 comments on commit 1a03bf9

Please sign in to comment.