Skip to content

Commit 4909b90

Browse files
committed
go fmt done!
1 parent f8a2f80 commit 4909b90

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

container/client.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ package container
22

33
import (
44
"fmt"
5-
"time"
65
"io/ioutil"
6+
"time"
77

88
log "github.com/Sirupsen/logrus"
9-
dockerclient "github.com/docker/docker/client"
109
"github.com/docker/docker/api/types"
1110
"github.com/docker/docker/api/types/network"
11+
dockerclient "github.com/docker/docker/client"
1212
"golang.org/x/net/context"
1313
)
1414

@@ -77,7 +77,7 @@ func (client dockerClient) ListContainers(fn Filter) ([]Container, error) {
7777
}
7878

7979
c := Container{containerInfo: &containerInfo, imageInfo: &imageInfo}
80-
if (fn(c)) {
80+
if fn(c) {
8181
cs = append(cs, c)
8282
}
8383
}
@@ -116,7 +116,7 @@ func (client dockerClient) StopContainer(c Container, timeout time.Duration) err
116116
}
117117

118118
func (client dockerClient) StartContainer(c Container) error {
119-
bg := context.Background();
119+
bg := context.Background()
120120
config := c.runtimeConfig()
121121
hostConfig := c.hostConfig()
122122
networkConfig := &network.NetworkingConfig{EndpointsConfig: c.containerInfo.NetworkSettings.Networks}
@@ -178,7 +178,7 @@ func (client dockerClient) IsContainerStale(c Container) (bool, error) {
178178

179179
if client.pullImages {
180180
log.Debugf("Pulling %s for %s", imageName, c.Name())
181-
181+
182182
var opts types.ImagePullOptions // ImagePullOptions can take a RegistryAuth arg to authenticate against a private registry
183183
auth, err := EncodedAuth(imageName)
184184
if err != nil {
@@ -197,7 +197,7 @@ func (client dockerClient) IsContainerStale(c Container) (bool, error) {
197197
return false, err
198198
}
199199
defer response.Close()
200-
200+
201201
// the pull request will be aborted prematurely unless the response is read
202202
_, err = ioutil.ReadAll(response)
203203
}
@@ -213,7 +213,6 @@ func (client dockerClient) IsContainerStale(c Container) (bool, error) {
213213
} else {
214214
log.Debugf("No new images found for %s", c.Name())
215215
}
216-
217216

218217
return false, nil
219218
}

container/trust.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ package container
22

33
import (
44
"errors"
5-
"os"
6-
"strings"
75
log "github.com/Sirupsen/logrus"
86
"github.com/docker/docker/api/types"
97
"github.com/docker/docker/api/types/reference"
108
"github.com/docker/docker/cli/command"
119
"github.com/docker/docker/cliconfig"
1210
"github.com/docker/docker/cliconfig/configfile"
1311
"github.com/docker/docker/cliconfig/credentials"
12+
"os"
13+
"strings"
1414
)
1515

1616
/**
@@ -35,7 +35,7 @@ func EncodedEnvAuth(ref string) (string, error) {
3535
username := os.Getenv("REPO_USER")
3636
password := os.Getenv("REPO_PASS")
3737
if username != "" && password != "" {
38-
auth := types.AuthConfig {
38+
auth := types.AuthConfig{
3939
Username: username,
4040
Password: password,
4141
}
@@ -80,7 +80,7 @@ func ParseServerAddress(ref string) (string, error) {
8080
}
8181
parts := strings.Split(repository, "/")
8282
return parts[0], nil
83-
83+
8484
}
8585

8686
// CredentialsStore returns a new credentials store based

container/util.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package container
22

3-
import (
4-
)
5-
63
func sliceEqual(s1, s2 []string) bool {
74
if len(s1) != len(s2) {
85
return false
@@ -65,4 +62,3 @@ func structMapSubtract(m1, m2 map[string]struct{}) map[string]struct{} {
6562

6663
return m
6764
}
68-

container/util_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@ func TestStructMapSubtract(t *testing.T) {
6363
assert.Equal(t, map[string]struct{}{"a": x, "b": x, "c": x}, m1)
6464
assert.Equal(t, map[string]struct{}{"a": x, "c": x}, m2)
6565
}
66-

0 commit comments

Comments
 (0)