From 6da8b3c4a1174e26015e15b1291a924c2564166f Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Thu, 4 Oct 2018 06:37:31 +0300 Subject: [PATCH] commands: simplify `s[:]` to s (#715) If s is a slice, then `s[:]` is identical to just `s`. Signed-off-by: Iskander Sharipov --- commands/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/util.go b/commands/util.go index 48d22682..23802f0e 100644 --- a/commands/util.go +++ b/commands/util.go @@ -34,7 +34,7 @@ func getPasswd(prompt string) (string, error) { return "", fmt.Errorf("Failed to read password") } if 0 < len(pass) { - return string(pass[:]), nil + return string(pass), nil } }