From 5b491cae82a3988810709d41717f8f8b0f8e9d9d Mon Sep 17 00:00:00 2001 From: Chunyi Lyu Date: Mon, 13 Sep 2021 15:36:02 +0100 Subject: [PATCH] Better variable naming --- internal/resource/default_user_secret.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/resource/default_user_secret.go b/internal/resource/default_user_secret.go index b72cab0b0..f26a04172 100644 --- a/internal/resource/default_user_secret.go +++ b/internal/resource/default_user_secret.go @@ -150,13 +150,13 @@ func (builder *DefaultUserSecretBuilder) updatePorts(secret *corev1.Secret) { // generateUsername returns a base64 string that has "default_user_" as prefix // returned string has length 'l' when base64 decoded func generateUsername(l int) (string, error) { - encodedStr, err := randomEncodedString(l) + encoded, err := randomEncodedString(l) if err != nil { return "", err } - encodedStrSlice := []byte(encodedStr) - return string(append([]byte(usernamePrefix), encodedStrSlice[0:len(encodedStrSlice)-len(usernamePrefix)]...)), nil + encodedSlice := []byte(encoded) + return string(append([]byte(usernamePrefix), encodedSlice[0:len(encodedSlice)-len(usernamePrefix)]...)), nil } func (builder *DefaultUserSecretBuilder) pluginEnabled(plugin v1beta1.Plugin) bool {