Skip to content

Commit 03f63c1

Browse files
committed
fix singleCaseSwitch lint violation
1 parent a5792b4 commit 03f63c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

node/pkg/common/chain_id_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ func parseProtoFile() ([]ProtoEntry, error) {
102102
// This traverses the parsed Go code looking for constant declarations
103103
// that have the type "ChainID"
104104
ast.Inspect(node, func(n ast.Node) bool {
105-
switch x := n.(type) {
106-
case *ast.GenDecl:
105+
x, ok := n.(*ast.GenDecl)
106+
if ok {
107107
if x.Tok == token.CONST {
108108
for _, spec := range x.Specs {
109109
if vspec, ok := spec.(*ast.ValueSpec); ok {

0 commit comments

Comments
 (0)