Cleanup redundant else statements find via golint #11602

Signed-off-by: George MacRorie <gmacr31@gmail.com>
Upstream-commit: 664ef0cbe2113e8307135e656cc6db9199f8268e
Component: engine
This commit is contained in:
George MacRorie
2015-03-23 19:21:37 +00:00
parent dad3640059
commit 0221549820
4 changed files with 18 additions and 20 deletions

View File

@ -158,14 +158,13 @@ func (sw *shellWord) processDollar() (string, error) {
return sw.getEnv(name), nil
}
return "", fmt.Errorf("Unsupported ${} substitution: %s", sw.word)
} else {
// $xxx case
name := sw.processName()
if name == "" {
return "$", nil
}
return sw.getEnv(name), nil
}
// $xxx case
name := sw.processName()
if name == "" {
return "$", nil
}
return sw.getEnv(name), nil
}
func (sw *shellWord) processName() string {