Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2 function descriptions in shared/util #12133

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions shared/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func ReaderToChannel(r io.Reader, bufferSize int) <-chan []byte {
return ch
}

// Returns a random base64 encoded string from crypto/rand.
// Returns a random hex encoded string from crypto/rand.
func RandomCryptoString() (string, error) {
buf := make([]byte, 32)
n, err := rand.Read(buf)
Expand Down Expand Up @@ -1340,7 +1340,7 @@ func SplitNTrimSpace(s string, sep string, n int, nilIfEmpty bool) []string {
return parts
}

// JoinTokenDecode decodes a base64 and JSON encode join token.
// JoinTokenDecode decodes a base64 and JSON encoded join token.
func JoinTokenDecode(input string) (*api.ClusterMemberJoinToken, error) {
joinTokenJSON, err := base64.StdEncoding.DecodeString(input)
if err != nil {
Expand Down