Skip to content

Commit

Permalink
Fix minor typos in parser debug logs (#858)
Browse files Browse the repository at this point in the history
* Add node name to parser debug logs for accepted nodes

* Fix capitalization in parser debug logs for rejected nodes
  • Loading branch information
volmedo authored Dec 3, 2024
1 parent 3a3fb6e commit 715d9a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ func (nv *NodeVisitor) DeclaredInterfaces() []string {
func (nv *NodeVisitor) add(ctx context.Context, n *ast.TypeSpec) {
log := zerolog.Ctx(ctx)
log.Debug().
Str("node-name", n.Name.Name).
Str("node-type", fmt.Sprintf("%T", n.Type)).
Msg("found node with acceptable type for mocking")
nv.declaredInterfaces = append(nv.declaredInterfaces, n.Name.Name)
Expand All @@ -382,7 +383,7 @@ func (nv *NodeVisitor) Visit(node ast.Node) ast.Visitor {
case *ast.InterfaceType, *ast.IndexExpr:
nv.add(nv.ctx, n)
default:
log.Debug().Msg("Found node with unacceptable type for mocking. Rejecting.")
log.Debug().Msg("found node with unacceptable type for mocking. Rejecting.")
}
}
return nv
Expand Down

0 comments on commit 715d9a3

Please sign in to comment.