File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ linters:
5353 path : _test\.go
5454 - linters :
5555 - errcheck
56+ - gocritic
57+ - govet
5658 path : examples/
5759 - linters :
5860 - errcheck
Original file line number Diff line number Diff line change @@ -1742,31 +1742,32 @@ func builtinIdenticalMember(args []Value) Value {
17421742 continue
17431743 }
17441744
1745- if args [0 ].valueType == IntegerValue {
1745+ switch args [0 ].valueType {
1746+ case IntegerValue :
17461747 v1 , _ := args [0 ].IntValue ()
17471748 v2 , _ := item .IntValue ()
17481749 if v1 == v2 {
17491750 return NewBoolValue (true )
17501751 }
1751- } else if args [ 0 ]. valueType == RealValue {
1752+ case RealValue :
17521753 v1 , _ := args [0 ].RealValue ()
17531754 v2 , _ := item .RealValue ()
17541755 if v1 == v2 {
17551756 return NewBoolValue (true )
17561757 }
1757- } else if args [ 0 ]. valueType == StringValue {
1758+ case StringValue :
17581759 v1 , _ := args [0 ].StringValue ()
17591760 v2 , _ := item .StringValue ()
17601761 if v1 == v2 {
17611762 return NewBoolValue (true )
17621763 }
1763- } else if args [ 0 ]. valueType == BooleanValue {
1764+ case BooleanValue :
17641765 v1 , _ := args [0 ].BoolValue ()
17651766 v2 , _ := item .BoolValue ()
17661767 if v1 == v2 {
17671768 return NewBoolValue (true )
17681769 }
1769- } else if args [ 0 ]. valueType == UndefinedValue {
1770+ case UndefinedValue :
17701771 return NewBoolValue (true )
17711772 }
17721773 }
Original file line number Diff line number Diff line change @@ -83,9 +83,10 @@ func (r *Reader) nextNew() bool {
8383
8484 // Count brackets to handle nested ClassAds
8585 for _ , ch := range line {
86- if ch == '[' {
86+ switch ch {
87+ case '[' :
8788 bracketDepth ++
88- } else if ch == ']' {
89+ case ']' :
8990 bracketDepth --
9091 }
9192 }
You can’t perform that action at this time.
0 commit comments