Skip to content

Commit 9e6b17c

Browse files
committed
reformat
1 parent 8dbf34a commit 9e6b17c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

dockerhook.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package main
22

33
import (
4-
"log"
5-
"os"
4+
"bytes"
5+
"encoding/json"
66
"flag"
7-
"strings"
87
"fmt"
9-
"path/filepath"
8+
"log"
9+
"os"
1010
"os/exec"
11+
"path/filepath"
12+
"strings"
1113
"syscall"
12-
"bytes"
13-
"encoding/json"
1414

1515
"github.com/flynn/go-shlex"
1616
dockerapi "github.com/fsouza/go-dockerclient"
@@ -19,10 +19,10 @@ import (
1919
var debug = flag.Bool("d", false, "debug mode displays handler output")
2020
var shell = flag.Bool("s", false, "run handler via SHELL")
2121

22-
var skipInspect = map[string]bool {
23-
"destroy": true,
24-
"untag": true,
25-
"delete": true,
22+
var skipInspect = map[string]bool{
23+
"destroy": true,
24+
"untag": true,
25+
"delete": true,
2626
}
2727

2828
func init() {
@@ -81,7 +81,7 @@ func trigger(hook []string, event, id string, docker *dockerapi.Client) {
8181
var cmd *exec.Cmd
8282
if *shell && os.Getenv("SHELL") != "" {
8383
cmd = exec.Command(os.Getenv("SHELL"), "-c", strings.Join(hook, " "))
84-
} else {
84+
} else {
8585
cmd = exec.Command(hook[0], hook[1:]...)
8686
}
8787
if !skipInspect[event] {
@@ -133,4 +133,4 @@ func main() {
133133
}
134134

135135
log.Fatal("fatal: docker event loop closed") // todo: reconnect?
136-
}
136+
}

0 commit comments

Comments
 (0)