Skip to content

Commit

Permalink
chore: enable more linters and address their findings. (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoido authored Dec 10, 2023
1 parent 3b4fa69 commit 7339ecd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
linters:
# Disable all default linters and enable only revive and formatters before
# new findings by default linters are addressed.
disable-all: true
enable:
- dupword
- errcheck
- errname
- godot
- gofumpt
- goimports
- misspell
- revive
- unconvert
- unused

issues:
exclude-use-default: false
Expand Down
2 changes: 1 addition & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// ErrHelp is the error returned if the -help or -h flag is invoked but no such flag is defined.
// Alias for flag.ErrHelp
// Alias for flag.ErrHelp.
var ErrHelp = flag.ErrHelp

// Parser registers and parses configuration values.
Expand Down
4 changes: 2 additions & 2 deletions value/floats.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ func (iv *float64Value) Set(val string) error {
return err
}

*iv.dest = float64(num)
*iv.dest = num
return nil
}

func (iv *float64Value) String() string {
return strconv.FormatFloat(float64(*iv.dest), 'G', -1, 64)
return strconv.FormatFloat(*iv.dest, 'G', -1, 64)
}

0 comments on commit 7339ecd

Please sign in to comment.