From eff9c0c8c6d32c2060841a9b9b98d9d4b38540b2 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 17 Nov 2021 10:30:17 +0100 Subject: Refactored to replace github pkg errors dependencies with fmt.Errorf --- pkg/client/input.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pkg/client') 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 { -- cgit v1.2.3