aboutsummaryrefslogtreecommitdiff
path: root/pkg/client/input.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-11-17 10:30:17 +0100
committerJulien Dessaux2021-11-17 10:30:17 +0100
commiteff9c0c8c6d32c2060841a9b9b98d9d4b38540b2 (patch)
treeaf77a8d0867dc11dfa9130a0bba509b6b55b8246 /pkg/client/input.go
parentRefactored package structure (diff)
downloadshell-game-launcher-master.tar.gz
shell-game-launcher-master.tar.bz2
shell-game-launcher-master.zip
Refactored to replace github pkg errors dependencies with fmt.ErrorfHEADmaster
Diffstat (limited to 'pkg/client/input.go')
-rw-r--r--pkg/client/input.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/client/input.go b/pkg/client/input.go
index 8c814a6..bcdab13 100644
--- a/pkg/client/input.go
+++ b/pkg/client/input.go
@@ -2,9 +2,8 @@ package client
import (
"bufio"
+ "fmt"
"os"
-
- "github.com/pkg/errors"
)
// getValidInput returns the selected menu command as a string or an error
@@ -15,7 +14,7 @@ func (s *State) getValidInput() (string, error) {
for {
input, err := reader.ReadByte()
if err != nil {
- return "", errors.Wrapf(err, "Could not read byte from stdin")
+ return "", fmt.Errorf("Could not read byte from stdin : %w", err)
}
for _, menuEntry := range menu.MenuEntries {
if []byte(menuEntry.Key)[0] == input {