aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2023-09-28 22:06:35 +0100
committerJoop Kiefte <ikojba@gmail.com>2023-09-28 22:06:35 +0100
commit3621df34540f48a4ced64a2486d5e5d467b7e3ee (patch)
treea0472d2277218ee721616c554daff4f68dbc1895
parent57a00ae95cee65ba42251294a595b1cd32a87885 (diff)
Switch slice for trim
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index 31410fa..7f9e0af 100644
--- a/main.go
+++ b/main.go
@@ -112,7 +112,7 @@ func Readline() string {
// Read a line from stdin
reader := bufio.NewReader(os.Stdin)
text, _ := reader.ReadString('\n')
- return text[:len(text)-1]
+ return strings.TrimRight(text, "\n")
}
func ExecuteDoltCommand(args ...string) {