Skip to content

Commit

Permalink
Fix go vet warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm committed Jun 21, 2016
1 parent b879342 commit c6ccf00
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions cmd_reload.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ var CmdReload = &Cmd{
}

foundRC := config.FindRC()
if foundRC != nil {
return foundRC.Touch()
} else {
if foundRC == nil {
return fmt.Errorf(".envrc not found")
}

return nil
return foundRC.Touch()
},
}
6 changes: 3 additions & 3 deletions env_diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ func TestEnvDiff(t *testing.T) {

diff2, err := LoadEnvDiff(out)
if err != nil {
t.Errorf("parse error", err)
t.Error("parse error", err)
}

if len(diff2.Prev) != 1 {
t.Errorf("len(diff2.prev) != 1", len(diff2.Prev))
t.Error("len(diff2.prev) != 1", len(diff2.Prev))
}

if len(diff2.Next) != 1 {
t.Errorf("len(diff2.next) != 0", len(diff2.Next))
t.Error("len(diff2.next) != 0", len(diff2.Next))
}
}

Expand Down
6 changes: 3 additions & 3 deletions env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ func TestEnv(t *testing.T) {

env2, err := LoadEnv(out)
if err != nil {
t.Errorf("parse error", err)
t.Error("parse error", err)
}

if env2["FOO"] != "bar" {
t.Errorf("FOO != bar", env2["FOO"])
t.Error("FOO != bar", env2["FOO"])
}

if len(env2) != 1 {
t.Errorf("len != 1", len(env2))
t.Error("len != 1", len(env2))
}
}

0 comments on commit c6ccf00

Please sign in to comment.