Skip to content

Commit

Permalink
use readline instead of bufio
Browse files Browse the repository at this point in the history
add readline to vendor

update CHANGELOG
  • Loading branch information
Hongbo Zhang committed Jul 28, 2016
1 parent 9f56d62 commit 1475ce0
Show file tree
Hide file tree
Showing 37 changed files with 5,187 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* Fixed a bug where the failed creation of a custom resources could cause a CloudFormation stack to fail to rollback. [#938](https://github.com/remind101/empire/pull/938)
* Fixed a bug where waiting for a deploy to stabilize was failing if you had more than 10 services. [#944](https://github.com/remind101/empire/issues/944)
* Fixed an issue in the Tugboat integration where the log stream to a Tugboat instance could be closed. [#950](https://github.com/remind101/empire/pull/950)
* Fixed an issue where typing commit message does not allow user to use arrow keys, etc. [#958](https://github.com/remind101/empire/pull/958)

**Performance**

Expand Down
10 changes: 6 additions & 4 deletions cmd/emp/util.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"bufio"
"errors"
"fmt"
"io"
Expand All @@ -15,6 +14,7 @@ import (
"strings"
"time"

"github.com/chzyer/readline"
"github.com/mgutz/ansi"
"github.com/remind101/empire/cmd/emp/hkclient"
"github.com/remind101/empire/pkg/heroku"
Expand Down Expand Up @@ -154,9 +154,11 @@ func askForMessage() (string, error) {
}

fmt.Println("A commit message is required, enter one below:")
fmt.Printf("> ")
reader := bufio.NewReader(os.Stdin)
message, err := reader.ReadString('\n')
reader, err := readline.New("> ")
if err != nil {
return "", err
}
message, err := reader.Readline()
return strings.Trim(message, " \n"), err
}

Expand Down
58 changes: 58 additions & 0 deletions vendor/github.com/chzyer/readline/CHANGELOG.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions vendor/github.com/chzyer/readline/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1475ce0

Please sign in to comment.