From 22893429ed29dbb7a01eed7a90a4d1fbecfd5d90 Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Fri, 12 Apr 2013 07:37:24 -0700 Subject: [PATCH] Go fmt --- docker/docker.go | 24 ++++++++++++------------ network.go | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docker/docker.go b/docker/docker.go index a8f4a9e9a6..76a0467be8 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -74,19 +74,19 @@ func removePidFile(pidfile string) { } func daemon(pidfile string) error { - if err := createPidFile(pidfile); err != nil { - log.Fatal(err) - } - defer removePidFile(pidfile) + if err := createPidFile(pidfile); err != nil { + log.Fatal(err) + } + defer removePidFile(pidfile) - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, os.Kill, os.Signal(syscall.SIGTERM)) - go func() { - sig := <-c - log.Printf("Received signal '%v', exiting\n", sig) - removePidFile(pidfile) - os.Exit(0) - }() + c := make(chan os.Signal, 1) + signal.Notify(c, os.Interrupt, os.Kill, os.Signal(syscall.SIGTERM)) + go func() { + sig := <-c + log.Printf("Received signal '%v', exiting\n", sig) + removePidFile(pidfile) + os.Exit(0) + }() service, err := docker.NewServer() if err != nil { diff --git a/network.go b/network.go index 9164c1d72e..706c31fa4e 100644 --- a/network.go +++ b/network.go @@ -293,7 +293,7 @@ func (alloc *PortAllocator) Acquire(port int) (int, error) { func newPortAllocator() (*PortAllocator, error) { allocator := &PortAllocator{ - inUse: make(map[int]struct{}), + inUse: make(map[int]struct{}), fountain: make(chan int), } go allocator.runFountain()