Skip to content

Commit d2938c8

Browse files
authored
Merge pull request #281 from mboersma/update-go-dev
chore(Dockerfile): update go-dev to v0.21.0
2 parents eb21ef2 + 0fd3251 commit d2938c8

9 files changed

Lines changed: 23 additions & 5 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/deis/go-dev:0.19.0
1+
FROM quay.io/deis/go-dev:v0.21.0
22
# This Dockerfile is used to bundle the source and all dependencies into an image for testing.
33

44
RUN echo "deb http://packages.cloud.google.com/apt cloud-sdk-jessie main" \

cmd/auth.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ func (d *DeisCmd) Register(controller string, username string, password string,
4343
if password == "" {
4444
d.Print("password: ")
4545
password, err = readPassword()
46+
if err != nil {
47+
return err
48+
}
49+
4650
d.Printf("\npassword (confirm): ")
4751
passwordConfirm, err := readPassword()
4852
d.Println()
@@ -164,6 +168,10 @@ func (d *DeisCmd) Passwd(username, password, newPassword string) error {
164168
if newPassword == "" {
165169
d.Print("new password: ")
166170
newPassword, err = readPassword()
171+
if err != nil {
172+
return err
173+
}
174+
167175
d.Printf("\nnew password (confirm): ")
168176
passwordConfirm, err := readPassword()
169177

cmd/git.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const remoteDeletionMsg = "Git remotes for app %s removed.\n"
1212
// GitRemote creates a git remote for a deis app.
1313
func (d *DeisCmd) GitRemote(appID, remote string, force bool) error {
1414
s, appID, err := load(d.ConfigFile, appID)
15+
if err != nil {
16+
return err
17+
}
1518

1619
remoteURL, err := git.RemoteURL(git.DefaultCmd, remote)
1720

cmd/ps.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func printProcesses(appID string, input []api.Pods, wOut io.Writer) {
118118
}
119119

120120
func parseType(target string, appID string) (string, string) {
121-
psType, psName := "", ""
121+
var psType, psName string
122122

123123
if strings.Contains(target, "-") {
124124
replaced := strings.Replace(target, appID+"-", "", 1)

cmd/utils_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ func TestLoad(t *testing.T) {
2929
}
3030

3131
filename, err = config.Save(filename)
32+
assert.NoErr(t, err)
3233

3334
_, appID, err := load(filename, "test")
3435
assert.NoErr(t, err)

parser/labels.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func labelsSet(argv []string, cmdr cmd.Commander) error {
6464
Sets labels for an application.
6565
6666
A label is a key/value pair used to label an application. This label is a general information for deis user.
67-
Mostly used for administraton/maintenance information, note for application. This information isn't send to scheduler.
67+
Mostly used for administration/maintenance information, note for application. This information isn't send to scheduler.
6868
6969
Usage: deis labels:set [options] <key>=<value>...
7070

parser/releases.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ Options:
8686
`
8787

8888
args, err := docopt.Parse(usage, argv, true, "", false, true)
89+
if err != nil {
90+
return err
91+
}
8992

9093
version, err := versionFromString(args["<version>"].(string))
9194

@@ -114,6 +117,9 @@ Options:
114117
`
115118

116119
args, err := docopt.Parse(usage, argv, true, "", false, true)
120+
if err != nil {
121+
return err
122+
}
117123

118124
var version int
119125

pkg/git/git_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ deis ssh://git@deis-builder.example.com:2222/test.git (push)
147147
assert.Equal(t, cmd, []string{"remote", "-v"}, "args")
148148
return "", errors.New("test error")
149149
}, "deis.test.com")
150+
assert.NoErr(t, err)
150151
wd, err := os.Getwd()
151152
assert.NoErr(t, err)
152153
assert.Equal(t, app, filepath.Base(wd), "app")

pkg/logging/log_unix.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ func chooseColor(input string) string {
4343

4444
// PrintLog prints a log line with a color matched to its category.
4545
func PrintLog(out io.Writer, log string) {
46-
category := "unknown"
4746
parts := strings.Split(strings.Split(log, " -- ")[0], " ")
48-
category = parts[0]
47+
category := parts[0]
4948
colorVars := map[string]string{
5049
"Color": chooseColor(category),
5150
"Log": log,

0 commit comments

Comments
 (0)