diff --git a/.golangci.yml b/.golangci.yml index fb91925..3f4d3ed 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/parser.go b/parser.go index 12a4404..5093db5 100644 --- a/parser.go +++ b/parser.go @@ -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. diff --git a/value/floats.go b/value/floats.go index 66e8244..f0abb71 100644 --- a/value/floats.go +++ b/value/floats.go @@ -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) }