From 63f9bccf9fd15c38fe09b19e40ab6e371a25f3ff Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Thu, 1 Jun 2017 22:10:19 +0200 Subject: [PATCH] refactor: fix typos. refactor: typo in whitelister file name. --- acme/account.go | 2 +- cluster/leadership.go | 2 +- middlewares/{ip_witelister.go => ip_whitelister.go} | 0 provider/dynamodb/dynamodb_test.go | 8 ++++---- provider/string_util_test.go | 2 +- server/configuration.go | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename middlewares/{ip_witelister.go => ip_whitelister.go} (100%) diff --git a/acme/account.go b/acme/account.go index c913c2742..7a897cdba 100644 --- a/acme/account.go +++ b/acme/account.go @@ -33,7 +33,7 @@ type ChallengeCert struct { certificate *tls.Certificate } -// Init inits acccount struct +// Init inits account struct func (a *Account) Init() error { err := a.DomainsCertificate.Init() if err != nil { diff --git a/cluster/leadership.go b/cluster/leadership.go index e091fc8cc..292e23e14 100644 --- a/cluster/leadership.go +++ b/cluster/leadership.go @@ -54,7 +54,7 @@ func (l *Leadership) Participate(pool *safe.Pool) { }) } -// AddListener adds a leadership listerner +// AddListener adds a leadership listener func (l *Leadership) AddListener(listener LeaderListener) { l.listeners = append(l.listeners, listener) } diff --git a/middlewares/ip_witelister.go b/middlewares/ip_whitelister.go similarity index 100% rename from middlewares/ip_witelister.go rename to middlewares/ip_whitelister.go diff --git a/provider/dynamodb/dynamodb_test.go b/provider/dynamodb/dynamodb_test.go index 8dd24ebdf..264036ba8 100644 --- a/provider/dynamodb/dynamodb_test.go +++ b/provider/dynamodb/dynamodb_test.go @@ -12,7 +12,7 @@ import ( "github.com/containous/traefik/types" ) -type mockDynamoDBCLient struct { +type mockDynamoDBClient struct { dynamodbiface.DynamoDBAPI testWithError bool } @@ -40,7 +40,7 @@ var frontend = &types.Frontend{ // ScanPages simulates a call to ScanPages (see https://docs.aws.amazon.com/sdk-for-go/api/service/dynamodb/#DynamoDB.ScanPages) // by running the fn function twice and returning an item each time. -func (m *mockDynamoDBCLient) ScanPages(input *dynamodb.ScanInput, fn func(*dynamodb.ScanOutput, bool) bool) error { +func (m *mockDynamoDBClient) ScanPages(input *dynamodb.ScanInput, fn func(*dynamodb.ScanOutput, bool) bool) error { if m.testWithError { return errors.New("fake error") } @@ -86,7 +86,7 @@ func (m *mockDynamoDBCLient) ScanPages(input *dynamodb.ScanInput, fn func(*dynam func TestLoadDynamoConfigSuccessful(t *testing.T) { dbiface := &dynamoClient{ - db: &mockDynamoDBCLient{ + db: &mockDynamoDBClient{ testWithError: false, }, } @@ -110,7 +110,7 @@ func TestLoadDynamoConfigSuccessful(t *testing.T) { func TestLoadDynamoConfigFailure(t *testing.T) { dbiface := &dynamoClient{ - db: &mockDynamoDBCLient{ + db: &mockDynamoDBClient{ testWithError: true, }, } diff --git a/provider/string_util_test.go b/provider/string_util_test.go index 4361315a6..131d18e73 100644 --- a/provider/string_util_test.go +++ b/provider/string_util_test.go @@ -36,7 +36,7 @@ func TestSplitAndTrimString(t *testing.T) { input: " foo ,, bar ", expected: []string{"foo", "bar"}, }, { - desc: "consecutive commas with witespace", + desc: "consecutive commas with whitespace", input: " foo , , bar ", expected: []string{"foo", "bar"}, }, { diff --git a/server/configuration.go b/server/configuration.go index ec53ce36f..471252123 100644 --- a/server/configuration.go +++ b/server/configuration.go @@ -419,7 +419,7 @@ func NewTraefikDefaultPointersConfiguration() *TraefikConfiguration { defaultBoltDb.Prefix = "/traefik" defaultBoltDb.Constraints = types.Constraints{} - //default Provider + //default Kubernetes var defaultKubernetes kubernetes.Provider defaultKubernetes.Watch = true defaultKubernetes.Endpoint = ""