pkg/eventparser/event_parser.go
Showing 3 of 3 total issues
Method structVisitor.Visit
has a Cognitive Complexity of 55 (exceeds 20 allowed). Consider refactoring. Open
Open
func (v *structVisitor) Visit(node ast.Node) (w ast.Visitor) { switch n := node.(type) { case *ast.TypeSpec: if value, ok := n.Type.(*ast.StructType); ok { var subjectID string
- Read upRead up
Method structVisitor.Visit
has 66 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (v *structVisitor) Visit(node ast.Node) (w ast.Visitor) { switch n := node.(type) { case *ast.TypeSpec: if value, ok := n.Type.(*ast.StructType); ok { var subjectID string
Avoid deeply nested control flow statements. Open
Open
if serializedFields == nil { serializedFields = make(map[string]string) }