summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2019-11-27 15:43:53 +0100
committerSebastiaan van Stijn <github@gone.nl>2019-11-27 15:43:53 +0100
commitf4f56b1197934858b15d7b0548b2821a8e1322e2 (patch)
tree7a25f54cebe0c3f5c80478f99112fc94ce47dd37
parentec4bc832589046118b6f1332f0a99664c6e42059 (diff)
downloaddocker-f4f56b1197934858b15d7b0548b2821a8e1322e2.tar.gz
daemon: normalize comment formatting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
-rw-r--r--daemon/container.go2
-rw-r--r--daemon/container_linux.go2
-rw-r--r--daemon/events/events_test.go6
-rw-r--r--daemon/images/images.go2
-rw-r--r--daemon/links/links.go2
-rw-r--r--daemon/list.go2
-rw-r--r--daemon/network/settings.go4
7 files changed, 10 insertions, 10 deletions
diff --git a/daemon/container.go b/daemon/container.go
index a82d60c268..a06d503015 100644
--- a/daemon/container.go
+++ b/daemon/container.go
@@ -154,7 +154,7 @@ func (daemon *Daemon) newContainer(name string, operatingSystem string, config *
base.Created = time.Now().UTC()
base.Managed = managed
base.Path = entrypoint
- base.Args = args //FIXME: de-duplicate from config
+ base.Args = args // FIXME: de-duplicate from config
base.Config = config
base.HostConfig = &containertypes.HostConfig{}
base.ImageID = imgID
diff --git a/daemon/container_linux.go b/daemon/container_linux.go
index 0818f62a89..f81aa82931 100644
--- a/daemon/container_linux.go
+++ b/daemon/container_linux.go
@@ -8,7 +8,7 @@ import (
)
func (daemon *Daemon) saveApparmorConfig(container *container.Container) error {
- container.AppArmorProfile = "" //we don't care about the previous value.
+ container.AppArmorProfile = "" // we don't care about the previous value.
if !daemon.apparmorEnabled {
return nil // if apparmor is disabled there is nothing to do here.
diff --git a/daemon/events/events_test.go b/daemon/events/events_test.go
index d11521567f..6a193fc084 100644
--- a/daemon/events/events_test.go
+++ b/daemon/events/events_test.go
@@ -163,9 +163,9 @@ func TestLogEvents(t *testing.T) {
// https://github.com/docker/docker/issues/20999
// Fixtures:
//
-//2016-03-07T17:28:03.022433271+02:00 container die 0b863f2a26c18557fc6cdadda007c459f9ec81b874780808138aea78a3595079 (image=ubuntu, name=small_hoover)
-//2016-03-07T17:28:03.091719377+02:00 network disconnect 19c5ed41acb798f26b751e0035cd7821741ab79e2bbd59a66b5fd8abf954eaa0 (type=bridge, container=0b863f2a26c18557fc6cdadda007c459f9ec81b874780808138aea78a3595079, name=bridge)
-//2016-03-07T17:28:03.129014751+02:00 container destroy 0b863f2a26c18557fc6cdadda007c459f9ec81b874780808138aea78a3595079 (image=ubuntu, name=small_hoover)
+// 2016-03-07T17:28:03.022433271+02:00 container die 0b863f2a26c18557fc6cdadda007c459f9ec81b874780808138aea78a3595079 (image=ubuntu, name=small_hoover)
+// 2016-03-07T17:28:03.091719377+02:00 network disconnect 19c5ed41acb798f26b751e0035cd7821741ab79e2bbd59a66b5fd8abf954eaa0 (type=bridge, container=0b863f2a26c18557fc6cdadda007c459f9ec81b874780808138aea78a3595079, name=bridge)
+// 2016-03-07T17:28:03.129014751+02:00 container destroy 0b863f2a26c18557fc6cdadda007c459f9ec81b874780808138aea78a3595079 (image=ubuntu, name=small_hoover)
func TestLoadBufferedEvents(t *testing.T) {
now := time.Now()
f, err := timetypes.GetTimestamp("2016-03-07T17:28:03.100000000+02:00", now)
diff --git a/daemon/images/images.go b/daemon/images/images.go
index d17a2e2455..0288556e68 100644
--- a/daemon/images/images.go
+++ b/daemon/images/images.go
@@ -171,7 +171,7 @@ func (i *ImageService) Images(imageFilters filters.Args, all bool, withExtraAttr
if all || len(i.imageStore.Children(id)) == 0 {
if imageFilters.Contains("dangling") && !danglingOnly {
- //dangling=false case, so dangling image is not needed
+ // dangling=false case, so dangling image is not needed
continue
}
if imageFilters.Contains("reference") { // skip images with no references if filtering by reference
diff --git a/daemon/links/links.go b/daemon/links/links.go
index be153f6bb0..911a5aca12 100644
--- a/daemon/links/links.go
+++ b/daemon/links/links.go
@@ -56,7 +56,7 @@ func (l *Link) ToEnv() []string {
env = append(env, fmt.Sprintf("%s_PORT=%s://%s:%s", alias, p.Proto(), l.ChildIP, p.Port()))
}
- //sort the ports so that we can bulk the continuous ports together
+ // sort the ports so that we can bulk the continuous ports together
nat.Sort(l.Ports, func(ip, jp nat.Port) bool {
// If the two ports have the same number, tcp takes priority
// Sort in desc order
diff --git a/daemon/list.go b/daemon/list.go
index 69fb69a90c..19f806ce43 100644
--- a/daemon/list.go
+++ b/daemon/list.go
@@ -388,7 +388,7 @@ func portOp(key string, filter map[nat.Port]bool) func(value string) error {
if strings.Contains(value, ":") {
return fmt.Errorf("filter for '%s' should not contain ':': %s", key, value)
}
- //support two formats, original format <portnum>/[<proto>] or <startport-endport>/[<proto>]
+ // support two formats, original format <portnum>/[<proto>] or <startport-endport>/[<proto>]
proto, port := nat.SplitProtoPort(value)
start, end, err := nat.ParsePortRange(port)
if err != nil {
diff --git a/daemon/network/settings.go b/daemon/network/settings.go
index 7696d40201..39646c45ee 100644
--- a/daemon/network/settings.go
+++ b/daemon/network/settings.go
@@ -39,8 +39,8 @@ type EndpointSettings struct {
// AttachmentStore stores the load balancer IP address for a network id.
type AttachmentStore struct {
sync.Mutex
- //key: networkd id
- //value: load balancer ip address
+ // key: networkd id
+ // value: load balancer ip address
networkToNodeLBIP map[string]net.IP
}