Skip to content

Commit b3621ce

Browse files
spacez320sagikazarmark
authored andcommitted
style: better naming
1 parent da507cf commit b3621ce

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎viper_test.go‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ func TestReadConfigWithSetConfigFile(t *testing.T) {
15741574
}
15751575

15761576
func TestWrongFileNotFound(t *testing.T) {
1577-
var flErr FileLookupError
1577+
var fileLookupError FileLookupError
15781578

15791579
_, config := initDirs(t)
15801580

@@ -1587,7 +1587,7 @@ func TestWrongFileNotFound(t *testing.T) {
15871587
err := v.ReadInConfig()
15881588
// It matches all error types and the shared error interface.
15891589
assert.ErrorAs(t, err, &FileNotFoundError{})
1590-
assert.ErrorAs(t, err, &flErr)
1590+
assert.ErrorAs(t, err, &fileLookupError)
15911591

15921592
// Even though config did not load and the error might have
15931593
// been ignored by the client, the default still loads
@@ -1663,7 +1663,7 @@ func TestDirsSearch(t *testing.T) {
16631663
}
16641664

16651665
func TestWrongDirsSearchNotFound(t *testing.T) {
1666-
var flErr FileLookupError
1666+
var fileLookupError FileLookupError
16671667

16681668
_, config := initDirs(t)
16691669

@@ -1678,15 +1678,15 @@ func TestWrongDirsSearchNotFound(t *testing.T) {
16781678
// It matches all error types and the shared error interface.
16791679
assert.ErrorAs(t, err, &ConfigFileNotFoundError{})
16801680
assert.ErrorAs(t, err, &FileNotFoundFromSearchError{})
1681-
assert.ErrorAs(t, err, &flErr)
1681+
assert.ErrorAs(t, err, &fileLookupError)
16821682

16831683
// Even though config did not load and the error might have
16841684
// been ignored by the client, the default still loads
16851685
assert.Equal(t, `default`, v.GetString(`key`))
16861686
}
16871687

16881688
func TestWrongDirsSearchNotFoundForMerge(t *testing.T) {
1689-
var flErr FileLookupError
1689+
var fileLookupError FileLookupError
16901690

16911691
_, config := initDirs(t)
16921692

@@ -1701,7 +1701,7 @@ func TestWrongDirsSearchNotFoundForMerge(t *testing.T) {
17011701
// It matches both types of errors.
17021702
assert.ErrorAs(t, err, &ConfigFileNotFoundError{})
17031703
assert.ErrorAs(t, err, &FileNotFoundFromSearchError{})
1704-
assert.ErrorAs(t, err, &flErr)
1704+
assert.ErrorAs(t, err, &fileLookupError)
17051705

17061706
// Even though config did not load and the error might have
17071707
// been ignored by the client, the default still loads

0 commit comments

Comments
 (0)