Fix whitespace

This commit is contained in:
Mark Sagi-Kazar 2019-12-06 12:39:08 +01:00 committed by Márk Sági-Kazár
parent cea8b9dfcd
commit 7b5adba788
4 changed files with 0 additions and 18 deletions

View File

@ -11,7 +11,6 @@ linters:
- maligned - maligned
# TODO: fix me # TODO: fix me
- whitespace
- deadcode - deadcode
- unused - unused
- wsl - wsl

View File

@ -64,9 +64,7 @@ func (rc remoteConfigProvider) WatchChannel(rp viper.RemoteProvider) (<-chan *vi
Error: resp.Error, Error: resp.Error,
Value: resp.Value, Value: resp.Value,
} }
} }
} }
}(cryptoResponseCh, viperResponsCh, quitwc, quit) }(cryptoResponseCh, viperResponsCh, quitwc, quit)

View File

@ -996,7 +996,6 @@ func (v *Viper) BindEnv(input ...string) error {
// //
// Note: this assumes a lower-cased key given. // Note: this assumes a lower-cased key given.
func (v *Viper) find(lcaseKey string, flagDefault bool) interface{} { func (v *Viper) find(lcaseKey string, flagDefault bool) interface{} {
var ( var (
val interface{} val interface{}
exists bool exists bool

View File

@ -236,7 +236,6 @@ func initIni() {
// make directories for testing // make directories for testing
func initDirs(t *testing.T) (string, string, func()) { func initDirs(t *testing.T) (string, string, func()) {
var ( var (
testDirs = []string{`a a`, `b`, `C_`} testDirs = []string{`a a`, `b`, `C_`}
config = `improbable` config = `improbable`
@ -463,7 +462,6 @@ func TestEnv(t *testing.T) {
AutomaticEnv() AutomaticEnv()
assert.Equal(t, "crunk", Get("name")) assert.Equal(t, "crunk", Get("name"))
} }
func TestEmptyEnv(t *testing.T) { func TestEmptyEnv(t *testing.T) {
@ -812,7 +810,6 @@ func TestBindPFlags(t *testing.T) {
for name, expected := range mutatedTestValues { for name, expected := range mutatedTestValues {
assert.Equal(t, expected, v.Get(name)) assert.Equal(t, expected, v.Get(name))
} }
} }
func TestBindPFlagsStringSlice(t *testing.T) { func TestBindPFlagsStringSlice(t *testing.T) {
@ -924,7 +921,6 @@ func TestBindPFlag(t *testing.T) {
flag.Changed = true // hack for pflag usage flag.Changed = true // hack for pflag usage
assert.Equal(t, "testing_mutate", Get("testvalue")) assert.Equal(t, "testing_mutate", Get("testvalue"))
} }
func TestBoundCaseSensitivity(t *testing.T) { func TestBoundCaseSensitivity(t *testing.T) {
@ -946,7 +942,6 @@ func TestBoundCaseSensitivity(t *testing.T) {
BindPFlag("eYEs", flag) BindPFlag("eYEs", flag)
assert.Equal(t, "green", Get("eyes")) assert.Equal(t, "green", Get("eyes"))
} }
func TestSizeInBytes(t *testing.T) { func TestSizeInBytes(t *testing.T) {
@ -1069,10 +1064,8 @@ func TestFindsNestedKeys(t *testing.T) {
} }
for key, expectedValue := range expected { for key, expectedValue := range expected {
assert.Equal(t, expectedValue, v.Get(key)) assert.Equal(t, expectedValue, v.Get(key))
} }
} }
func TestReadBufConfig(t *testing.T) { func TestReadBufConfig(t *testing.T) {
@ -1136,7 +1129,6 @@ func TestIsSet(t *testing.T) {
} }
func TestDirsSearch(t *testing.T) { func TestDirsSearch(t *testing.T) {
root, config, cleanup := initDirs(t) root, config, cleanup := initDirs(t)
defer cleanup() defer cleanup()
@ -1159,7 +1151,6 @@ func TestDirsSearch(t *testing.T) {
} }
func TestWrongDirsSearchNotFound(t *testing.T) { func TestWrongDirsSearchNotFound(t *testing.T) {
_, config, cleanup := initDirs(t) _, config, cleanup := initDirs(t)
defer cleanup() defer cleanup()
@ -1179,7 +1170,6 @@ func TestWrongDirsSearchNotFound(t *testing.T) {
} }
func TestWrongDirsSearchNotFoundForMerge(t *testing.T) { func TestWrongDirsSearchNotFoundForMerge(t *testing.T) {
_, config, cleanup := initDirs(t) _, config, cleanup := initDirs(t)
defer cleanup() defer cleanup()
@ -1679,7 +1669,6 @@ func TestMergeConfigMap(t *testing.T) {
} }
assert(1234) assert(1234)
} }
func TestUnmarshalingWithAliases(t *testing.T) { func TestUnmarshalingWithAliases(t *testing.T) {
@ -1718,7 +1707,6 @@ func TestSetConfigNameClearsFileCache(t *testing.T) {
} }
func TestShadowedNestedValue(t *testing.T) { func TestShadowedNestedValue(t *testing.T) {
config := `name: steve config := `name: steve
clothing: clothing:
jacket: leather jacket: leather
@ -1898,7 +1886,6 @@ func doTestCaseInsensitive(t *testing.T, typ, config string) {
assert.Equal(t, 3, cast.ToInt(Get("ef.ijk"))) assert.Equal(t, 3, cast.ToInt(Get("ef.ijk")))
assert.Equal(t, 4, cast.ToInt(Get("ef.lm.no"))) assert.Equal(t, 4, cast.ToInt(Get("ef.lm.no")))
assert.Equal(t, 5, cast.ToInt(Get("ef.lm.p.q"))) assert.Equal(t, 5, cast.ToInt(Get("ef.lm.p.q")))
} }
func newViperWithConfigFile(t *testing.T) (*Viper, string, func()) { func newViperWithConfigFile(t *testing.T) (*Viper, string, func()) {
@ -2003,7 +1990,6 @@ func TestWatchFile(t *testing.T) {
require.Nil(t, err) require.Nil(t, err)
assert.Equal(t, "baz", v.Get("foo")) assert.Equal(t, "baz", v.Get("foo"))
}) })
} }
func TestUnmarshal_DotSeparatorBackwardCompatibility(t *testing.T) { func TestUnmarshal_DotSeparatorBackwardCompatibility(t *testing.T) {