From 54be6beaab0680496be1f5e21733411d257668a6 Mon Sep 17 00:00:00 2001 From: Emile Vauge Date: Thu, 2 Feb 2017 21:07:44 +0100 Subject: [PATCH] Lint files Signed-off-by: Emile Vauge --- acme/account.go | 2 +- acme/acme_test.go | 2 +- provider/marathon.go | 4 ++-- safe/routine.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acme/account.go b/acme/account.go index 8d6e7ccda..09181db00 100644 --- a/acme/account.go +++ b/acme/account.go @@ -133,7 +133,7 @@ func (dc *DomainsCertificates) removeDuplicates() { for i2 := i + 1; i2 < len(dc.Certs); i2++ { if reflect.DeepEqual(dc.Certs[i].Domains, dc.Certs[i2].Domains) { // delete - log.Warnf("Remove duplicate cert: %+v, exipration :%s", dc.Certs[i2].Domains, dc.Certs[i2].tlsCert.Leaf.NotAfter.String()) + log.Warnf("Remove duplicate cert: %+v, expiration :%s", dc.Certs[i2].Domains, dc.Certs[i2].tlsCert.Leaf.NotAfter.String()) dc.Certs = append(dc.Certs[:i2], dc.Certs[i2+1:]...) i2-- } diff --git a/acme/acme_test.go b/acme/acme_test.go index 1cc63d25c..49ea1c014 100644 --- a/acme/acme_test.go +++ b/acme/acme_test.go @@ -210,7 +210,7 @@ func TestRemoveDuplicates(t *testing.T) { t.Errorf("Bad expiration %s date for domain %+v, now %s", cert.tlsCert.Leaf.NotAfter.String(), cert, now.Add(48*time.Hour).Truncate(1*time.Second).String()) } default: - t.Errorf("Unkown domain %+v", cert) + t.Errorf("Unknown domain %+v", cert) } } } diff --git a/provider/marathon.go b/provider/marathon.go index b7c84a589..046767c33 100644 --- a/provider/marathon.go +++ b/provider/marathon.go @@ -505,7 +505,7 @@ func processPorts(application marathon.Application, task marathon.Task) []int { // Using port definition if available if application.PortDefinitions != nil && len(*application.PortDefinitions) > 0 { - ports := make([]int, 0) + var ports []int for _, def := range *application.PortDefinitions { if def.Port != nil { ports = append(ports, *def.Port) @@ -515,7 +515,7 @@ func processPorts(application marathon.Application, task marathon.Task) []int { } // If using IP-per-task using this port definition if application.IPAddressPerTask != nil && len(*((*application.IPAddressPerTask).Discovery).Ports) > 0 { - ports := make([]int, 0) + var ports []int for _, def := range *((*application.IPAddressPerTask).Discovery).Ports { ports = append(ports, def.Number) } diff --git a/safe/routine.go b/safe/routine.go index 4d32f2a55..857cf82e3 100644 --- a/safe/routine.go +++ b/safe/routine.go @@ -1,10 +1,10 @@ package safe import ( + "context" "fmt" "github.com/cenk/backoff" "github.com/containous/traefik/log" - "context" "runtime/debug" "sync" )