mirror of
https://github.com/foomo/gostandards.git
synced 2025-10-16 12:35:41 +00:00
chore: fix lint issues
This commit is contained in:
parent
631bf64be1
commit
9fb97f7bac
@ -84,7 +84,7 @@ linters:
|
|||||||
- bodyclose # checks whether HTTP response body is closed successfully [fast: false, auto-fix: false]
|
- bodyclose # checks whether HTTP response body is closed successfully [fast: false, auto-fix: false]
|
||||||
- containedctx # containedctx is a linter that detects struct contained context.Context field [fast: false, auto-fix: false]
|
- containedctx # containedctx is a linter that detects struct contained context.Context field [fast: false, auto-fix: false]
|
||||||
- contextcheck # check whether the function uses a non-inherited context [fast: false, auto-fix: false]
|
- contextcheck # check whether the function uses a non-inherited context [fast: false, auto-fix: false]
|
||||||
- copyloopvar # (go >= 1.22) copyloopvar is a linter detects places where loop variables are copied [fast: true, auto-fix: false]
|
#- copyloopvar # (go >= 1.22) copyloopvar is a linter detects places where loop variables are copied [fast: true, auto-fix: false]
|
||||||
- decorder # check declaration order and count of types, constants, variables and functions [fast: true, auto-fix: false]
|
- decorder # check declaration order and count of types, constants, variables and functions [fast: true, auto-fix: false]
|
||||||
- durationcheck # check for two durations multiplied together [fast: false, auto-fix: false]
|
- durationcheck # check for two durations multiplied together [fast: false, auto-fix: false]
|
||||||
- errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and reports occations, where the check for the returned error can be omitted. [fast: false, auto-fix: false]
|
- errchkjson # Checks types passed to the json encoding functions. Reports unsupported types and reports occations, where the check for the returned error can be omitted. [fast: false, auto-fix: false]
|
||||||
@ -109,7 +109,7 @@ linters:
|
|||||||
- grouper # Analyze expression groups. [fast: true, auto-fix: false]
|
- grouper # Analyze expression groups. [fast: true, auto-fix: false]
|
||||||
- importas # Enforces consistent import aliases [fast: false, auto-fix: false]
|
- importas # Enforces consistent import aliases [fast: false, auto-fix: false]
|
||||||
- inamedparam # reports interfaces with unnamed method parameters [fast: true, auto-fix: false]
|
- inamedparam # reports interfaces with unnamed method parameters [fast: true, auto-fix: false]
|
||||||
- intrange # (go >= 1.22) intrange is a linter to find places where for loops could make use of an integer range. [fast: true, auto-fix: false]
|
#- intrange # (go >= 1.22) intrange is a linter to find places where for loops could make use of an integer range. [fast: true, auto-fix: false]
|
||||||
- loggercheck # (logrlint) Checks key value pairs for common logger libraries (kitlog,klog,logr,zap). [fast: false, auto-fix: false]
|
- loggercheck # (logrlint) Checks key value pairs for common logger libraries (kitlog,klog,logr,zap). [fast: false, auto-fix: false]
|
||||||
- makezero # Finds slice declarations with non-zero initial length [fast: false, auto-fix: false]
|
- makezero # Finds slice declarations with non-zero initial length [fast: false, auto-fix: false]
|
||||||
- misspell # Finds commonly misspelled English words [fast: true, auto-fix: true]
|
- misspell # Finds commonly misspelled English words [fast: true, auto-fix: true]
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestValid(t *testing.T) {
|
func TestValid(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
assert.True(t, iso4217.EUR.Valid())
|
assert.True(t, iso4217.EUR.Valid())
|
||||||
assert.True(t, iso4217.Currency("EUR").Valid())
|
assert.True(t, iso4217.Currency("EUR").Valid())
|
||||||
assert.False(t, iso4217.Currency("").Valid())
|
assert.False(t, iso4217.Currency("").Valid())
|
||||||
@ -15,6 +16,7 @@ func TestValid(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestString(t *testing.T) {
|
func TestString(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
assert.Equal(t, "EUR", iso4217.EUR.String())
|
assert.Equal(t, "EUR", iso4217.EUR.String())
|
||||||
assert.Equal(t, "EUR", iso4217.Currency("EUR").String())
|
assert.Equal(t, "EUR", iso4217.Currency("EUR").String())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user