mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon: normalize comment formatting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
ec4bc83258
commit
f4f56b1197
7 changed files with 10 additions and 10 deletions
|
@ -154,7 +154,7 @@ func (daemon *Daemon) newContainer(name string, operatingSystem string, config *
|
||||||
base.Created = time.Now().UTC()
|
base.Created = time.Now().UTC()
|
||||||
base.Managed = managed
|
base.Managed = managed
|
||||||
base.Path = entrypoint
|
base.Path = entrypoint
|
||||||
base.Args = args //FIXME: de-duplicate from config
|
base.Args = args // FIXME: de-duplicate from config
|
||||||
base.Config = config
|
base.Config = config
|
||||||
base.HostConfig = &containertypes.HostConfig{}
|
base.HostConfig = &containertypes.HostConfig{}
|
||||||
base.ImageID = imgID
|
base.ImageID = imgID
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func (daemon *Daemon) saveApparmorConfig(container *container.Container) error {
|
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 {
|
if !daemon.apparmorEnabled {
|
||||||
return nil // if apparmor is disabled there is nothing to do here.
|
return nil // if apparmor is disabled there is nothing to do here.
|
||||||
|
|
|
@ -163,9 +163,9 @@ func TestLogEvents(t *testing.T) {
|
||||||
// https://github.com/docker/docker/issues/20999
|
// https://github.com/docker/docker/issues/20999
|
||||||
// Fixtures:
|
// Fixtures:
|
||||||
//
|
//
|
||||||
//2016-03-07T17:28:03.022433271+02:00 container die 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.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.129014751+02:00 container destroy 0b863f2a26c18557fc6cdadda007c459f9ec81b874780808138aea78a3595079 (image=ubuntu, name=small_hoover)
|
||||||
func TestLoadBufferedEvents(t *testing.T) {
|
func TestLoadBufferedEvents(t *testing.T) {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
f, err := timetypes.GetTimestamp("2016-03-07T17:28:03.100000000+02:00", now)
|
f, err := timetypes.GetTimestamp("2016-03-07T17:28:03.100000000+02:00", now)
|
||||||
|
|
|
@ -171,7 +171,7 @@ func (i *ImageService) Images(imageFilters filters.Args, all bool, withExtraAttr
|
||||||
if all || len(i.imageStore.Children(id)) == 0 {
|
if all || len(i.imageStore.Children(id)) == 0 {
|
||||||
|
|
||||||
if imageFilters.Contains("dangling") && !danglingOnly {
|
if imageFilters.Contains("dangling") && !danglingOnly {
|
||||||
//dangling=false case, so dangling image is not needed
|
// dangling=false case, so dangling image is not needed
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if imageFilters.Contains("reference") { // skip images with no references if filtering by reference
|
if imageFilters.Contains("reference") { // skip images with no references if filtering by reference
|
||||||
|
|
|
@ -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()))
|
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 {
|
nat.Sort(l.Ports, func(ip, jp nat.Port) bool {
|
||||||
// If the two ports have the same number, tcp takes priority
|
// If the two ports have the same number, tcp takes priority
|
||||||
// Sort in desc order
|
// Sort in desc order
|
||||||
|
|
|
@ -388,7 +388,7 @@ func portOp(key string, filter map[nat.Port]bool) func(value string) error {
|
||||||
if strings.Contains(value, ":") {
|
if strings.Contains(value, ":") {
|
||||||
return fmt.Errorf("filter for '%s' should not contain ':': %s", key, 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)
|
proto, port := nat.SplitProtoPort(value)
|
||||||
start, end, err := nat.ParsePortRange(port)
|
start, end, err := nat.ParsePortRange(port)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -39,8 +39,8 @@ type EndpointSettings struct {
|
||||||
// AttachmentStore stores the load balancer IP address for a network id.
|
// AttachmentStore stores the load balancer IP address for a network id.
|
||||||
type AttachmentStore struct {
|
type AttachmentStore struct {
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
//key: networkd id
|
// key: networkd id
|
||||||
//value: load balancer ip address
|
// value: load balancer ip address
|
||||||
networkToNodeLBIP map[string]net.IP
|
networkToNodeLBIP map[string]net.IP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue