aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bridge_configure.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-11-26 19:07:14 +0100
committerGitHub <noreply@github.com>2019-11-26 19:07:14 +0100
commit26a62692415868dab906bc702504e83532cb09b9 (patch)
tree0dc5249803274142dcf50469debab522ae5e6f27 /commands/bridge_configure.go
parent44f648a931b43d707d37cb469fead5e21a615e04 (diff)
parent7cb772095ef9fada1d07924eb4cba57550bba60d (diff)
downloadgit-bug-26a62692415868dab906bc702504e83532cb09b9.tar.gz
Merge pull request #262 from MichaelMure/bridge
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 == "" {