commands: simplify s[:] to s (#715)

If s is a slice, then `s[:]` is identical to just `s`.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
This commit is contained in:
Iskander (Alex) Sharipov
2018-10-04 06:37:31 +03:00
committed by Kota Kanbe
parent d5c92cbcb3
commit 6da8b3c4a1

View File

@@ -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
}
}