Skip to content

Commit

Permalink
Drop outdated commented code from parseCmd
Browse files Browse the repository at this point in the history
And simplify with strings.TrimSpace.
  • Loading branch information
emersion committed Aug 14, 2023
1 parent db55b9c commit 18b5085
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ func parseCmd(line string) (cmd string, arg string, err error) {
return "", "", fmt.Errorf("mangled command: %q", line)
}

// I'm not sure if we should trim the args or not, but we will for now
//return strings.ToUpper(line[0:4]), strings.Trim(line[5:], " "), nil
return strings.ToUpper(line[0:4]), strings.Trim(line[5:], " \n\r"), nil
return strings.ToUpper(line[0:4]), strings.TrimSpace(line[5:]), nil
}

// Takes the arguments proceeding a command and files them
Expand Down

0 comments on commit 18b5085

Please sign in to comment.