aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bridge_configure.go
diff options
context:
space:
mode:
authoramine <hilalyamine@gmail.com>2019-11-25 15:08:48 +0100
committeramine <hilalyamine@gmail.com>2019-11-25 15:08:48 +0100
commit7cb772095ef9fada1d07924eb4cba57550bba60d (patch)
tree0dc5249803274142dcf50469debab522ae5e6f27 /commands/bridge_configure.go
parent44f648a931b43d707d37cb469fead5e21a615e04 (diff)
downloadgit-bug-7cb772095ef9fada1d07924eb4cba57550bba60d.tar.gz
bridge: trim inputs during bridge configuration
Diffstat (limited to 'commands/bridge_configure.go')
-rw-r--r--commands/bridge_configure.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/bridge_configure.go b/commands/bridge_configure.go
index 6f314135..6c24568c 100644
--- a/commands/bridge_configure.go
+++ b/commands/bridge_configure.go
@@ -82,7 +82,7 @@ func promptTarget() (string, error) {
return "", err
}
- line = strings.TrimRight(line, "\n")
+ line = strings.TrimSpace(line)
index, err := strconv.Atoi(line)
if err != nil || index <= 0 || index > len(targets) {
@@ -109,7 +109,7 @@ func promptName(repo repository.RepoCommon) (string, error) {
return "", err
}
- line = strings.TrimRight(line, "\n")
+ line = strings.TrimSpace(line)
name := line
if defaultExist && name == "" {