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:
committed by
Kota Kanbe
parent
d5c92cbcb3
commit
6da8b3c4a1
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user