Skip to content

Commit

Permalink
Fix dereferencing null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
codesuki committed Feb 8, 2017
1 parent b09596b commit d1706e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func main() {
if *cluster == "" {
var err error
cluster, err = findClusterName()
if *cluster == "" || err != nil {
if err != nil || *cluster == "" {
panic("could not determine cluster name. please define using --cluster / -c.")
}
log.Println("found cluster name to be:", *cluster)
Expand Down

0 comments on commit d1706e2

Please sign in to comment.