From 8df2a8c84388a92edd4825e79ac6ca0304676e13 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 27 Jul 2016 11:04:57 -0400 Subject: [PATCH] Apply gofmt to dns-controller --- dns-controller/pkg/dns/dnscontroller.go | 18 +++++++++--------- .../pkg/watchers/ingresscontroller.go | 4 ++-- dns-controller/pkg/watchers/nodecontroller.go | 4 ++-- dns-controller/pkg/watchers/podcontroller.go | 4 ++-- .../pkg/watchers/servicecontroller.go | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dns-controller/pkg/dns/dnscontroller.go b/dns-controller/pkg/dns/dnscontroller.go index 98d32d1637..0ad9665f5a 100644 --- a/dns-controller/pkg/dns/dnscontroller.go +++ b/dns-controller/pkg/dns/dnscontroller.go @@ -21,18 +21,18 @@ type DNSController struct { util.Stoppable // zones is the DNS provider - zones dnsprovider.Zones + zones dnsprovider.Zones // mutex protects the following mutable state - mutex sync.Mutex + mutex sync.Mutex // scopes is a map for each top-level grouping - scopes map[string]*DNSControllerScope + scopes map[string]*DNSControllerScope // lastSuccessSnapshot is the last snapshot we were able to apply to DNS // This lets us perform incremental updates to DNS. lastSuccessfulSnapshot *snapshot // changeCount is a change-counter, which helps us avoid computation when nothing has changed - changeCount uint64 + changeCount uint64 } // DNSController is a Context @@ -43,16 +43,16 @@ type DNSControllerScope struct { // ScopeName is the string id for this scope ScopeName string - parent *DNSController + parent *DNSController // mutex protected the following mutable state - mutex sync.Mutex + mutex sync.Mutex // Ready is set if the populating controller has performed an initial synchronization of records - Ready bool + Ready bool // Records is the map of actual records for this scope - Records map[string][]Record + Records map[string][]Record } // DNSControllerScope is a Scope @@ -312,7 +312,7 @@ func (o *dnsOp) findZone(fqdn string) dnsprovider.Zone { if dot == -1 { return nil } - zoneName = zoneName[dot + 1:] + zoneName = zoneName[dot+1:] } } diff --git a/dns-controller/pkg/watchers/ingresscontroller.go b/dns-controller/pkg/watchers/ingresscontroller.go index 0dc3a399e9..31cd37ef5f 100644 --- a/dns-controller/pkg/watchers/ingresscontroller.go +++ b/dns-controller/pkg/watchers/ingresscontroller.go @@ -21,7 +21,7 @@ import ( type IngressController struct { util.Stoppable kubeClient *client_extensions.ExtensionsClient - scope dns.Scope + scope dns.Scope } // newIngressController creates a ingressController @@ -32,7 +32,7 @@ func NewIngressController(kubeClient *client_extensions.ExtensionsClient, dns dn } c := &IngressController{ kubeClient: kubeClient, - scope: scope, + scope: scope, } return c, nil diff --git a/dns-controller/pkg/watchers/nodecontroller.go b/dns-controller/pkg/watchers/nodecontroller.go index 238a849f92..98e98aac95 100644 --- a/dns-controller/pkg/watchers/nodecontroller.go +++ b/dns-controller/pkg/watchers/nodecontroller.go @@ -20,7 +20,7 @@ import ( type NodeController struct { util.Stoppable kubeClient *client.CoreClient - scope dns.Scope + scope dns.Scope } // newNodeController creates a nodeController @@ -31,7 +31,7 @@ func NewNodeController(kubeClient *client.CoreClient, dns dns.Context) (*NodeCon } c := &NodeController{ kubeClient: kubeClient, - scope: scope, + scope: scope, } return c, nil diff --git a/dns-controller/pkg/watchers/podcontroller.go b/dns-controller/pkg/watchers/podcontroller.go index 97c42ea44e..4ca44825fc 100644 --- a/dns-controller/pkg/watchers/podcontroller.go +++ b/dns-controller/pkg/watchers/podcontroller.go @@ -32,7 +32,7 @@ func NewPodController(kubeClient *client.CoreClient, dns dns.Context) (*PodContr } c := &PodController{ kubeClient: kubeClient, - scope: scope, + scope: scope, } return c, nil @@ -127,7 +127,7 @@ func (c *PodController) updatePodRecords(pod *v1.Pod) { var aliases []string if pod.Spec.HostNetwork { if pod.Spec.NodeName != "" { - aliases = append(aliases, "node/" + pod.Spec.NodeName + "/external") + aliases = append(aliases, "node/"+pod.Spec.NodeName+"/external") } } else { glog.V(4).Infof("Pod %q had %s=%s, but was not HostNetwork", pod.Name, AnnotationNameDnsExternal, specExternal) diff --git a/dns-controller/pkg/watchers/servicecontroller.go b/dns-controller/pkg/watchers/servicecontroller.go index 049dd9ca6d..0831ec8f4a 100644 --- a/dns-controller/pkg/watchers/servicecontroller.go +++ b/dns-controller/pkg/watchers/servicecontroller.go @@ -21,7 +21,7 @@ import ( type ServiceController struct { util.Stoppable kubeClient *client.CoreClient - scope dns.Scope + scope dns.Scope } // newServiceController creates a serviceController @@ -32,7 +32,7 @@ func NewServiceController(kubeClient *client.CoreClient, dns dns.Context) (*Serv } c := &ServiceController{ kubeClient: kubeClient, - scope: scope, + scope: scope, } return c, nil @@ -158,5 +158,5 @@ func (c *ServiceController) updateServiceRecords(service *v1.Service) { glog.V(4).Infof("Service %q did not have %s annotation", service.Name, AnnotationNameDnsInternal) } - c.scope.Replace( service.Name, records) + c.scope.Replace(service.Name, records) }