Skip to content

Commit d533311

Browse files
author
Brent Beardsley
committed
trim args
1 parent 9ca7832 commit d533311

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cmd/histkeep/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"log"
77
"os"
8+
"strings"
89

910
"github.com/bbeardsley/histkeep"
1011
)
@@ -39,9 +40,9 @@ func main() {
3940
os.Exit(0)
4041
}
4142

42-
command := flag.Arg(0)
43-
file := flag.Arg(1)
44-
value := flag.Arg(2)
43+
command := strings.TrimSpace(flag.Arg(0))
44+
file := strings.TrimSpace(flag.Arg(1))
45+
value := strings.TrimSpace(flag.Arg(2))
4546

4647
hist := histkeep.NewHistKeep(file, *lastNPtr)
4748

0 commit comments

Comments
 (0)