linting: cover the basics

This commit is contained in:
Zach Ramsay
2017-09-21 15:26:43 -04:00
committed by Ethan Buchman
parent bd9f1d0d4c
commit 6a378d30f3
7 changed files with 13 additions and 23 deletions

View File

@ -183,12 +183,12 @@ func badCmd(c *cli.Context, cmd string) {
//Generates new Args array based off of previous call args to maintain flag persistence
func persistentArgs(line []byte) []string {
//generate the arguments to run from orginal os.Args
// generate the arguments to run from original os.Args
// to maintain flag arguments
args := os.Args
args = args[:len(args)-1] // remove the previous command argument
if len(line) > 0 { //prevents introduction of extra space leading to argument parse errors
if len(line) > 0 { // prevents introduction of extra space leading to argument parse errors
args = append(args, strings.Split(string(line), " ")...)
}
return args