Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
fix: accept comands with leading and trailing white spaces (#1200)
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <[email protected]>

Co-authored-by: Xuecheng Zhang <[email protected]>
  • Loading branch information
ti-srebot and csuzhangxc authored Oct 22, 2020
1 parent f89bb90 commit f0f5267
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/dm-ctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ func loop() {
}
continue
}

line = strings.TrimSpace(line)
if line == "exit" {
os.Exit(0)
} else if line == "" {
Expand Down

0 comments on commit f0f5267

Please sign in to comment.