Skip to content

Commit

Permalink
stylecheck: omit redundant types
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Jun 5, 2024
1 parent 5367073 commit 6467d5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ linters-settings:
- -ST1012 # error var ... should have name of the form ErrFoo
- -ST1016 # methods on the same type should have the same receiver name
- -ST1022 # comment on exported var ... should be of the form ...
- -ST1023 # should omit type ... from declaration; it will be inferred from the right-hand side

revive:
ignore-generated-header: true
Expand Down
9 changes: 4 additions & 5 deletions pkg/exprhelpers/debugger.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,13 +379,12 @@ func DisplayExprDebug(program *vm.Program, outputs []OpOutput, logger *log.Entry

// TBD: Based on the level of the logger (ie. trace vs debug) we could decide to add more low level instructions (pop, push, etc.)
func RunWithDebug(program *vm.Program, env interface{}, logger *log.Entry) ([]OpOutput, any, error) {

var outputs []OpOutput = []OpOutput{}
var buf strings.Builder
var erp ExprRuntimeDebug = ExprRuntimeDebug{
outputs := []OpOutput{}
erp := ExprRuntimeDebug{
Logger: logger,
}
var debugErr chan error = make(chan error)
debugErr := make(chan error)
var buf strings.Builder
vm := vm.Debug()
done := false
program.Opcodes(&buf)
Expand Down
4 changes: 2 additions & 2 deletions pkg/exprhelpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ func Distinct(params ...any) (any, error) {
return []interface{}{}, nil
}

var exists map[any]bool = make(map[any]bool)
var ret []interface{} = make([]interface{}, 0)
exists := make(map[any]bool)
ret := make([]interface{}, 0)

Check warning on line 247 in pkg/exprhelpers/helpers.go

View check run for this annotation

Codecov / codecov/patch

pkg/exprhelpers/helpers.go#L246-L247

Added lines #L246 - L247 were not covered by tests

for _, val := range array {
if _, ok := exists[val]; !ok {
Expand Down

0 comments on commit 6467d5c

Please sign in to comment.