Skip to content

Commit

Permalink
modded getString to trim leading/trailing whitespace since it isn't v…
Browse files Browse the repository at this point in the history
…alid input for any of the prompted fields but is accepted by the function
  • Loading branch information
kgoins committed Jan 19, 2021
1 parent f73567c commit 88550fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/cmdbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bufio"
"fmt"
"os"
"strings"

"github.com/kgoins/ldsview/internal"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -47,5 +48,7 @@ func getString() (output string) {
if scanner.Scan() {
output = scanner.Text()
}

output = strings.TrimSpace(output)
return
}

0 comments on commit 88550fe

Please sign in to comment.