From 2a8edebd6b112269df327ba227ee0724f6e2385c Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Mon, 28 Oct 2024 20:58:23 +0200 Subject: [PATCH] feat: chars -> charsAPIKey --- internal/util/apikey.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/util/apikey.go b/internal/util/apikey.go index e5cdb8c..6eecd48 100644 --- a/internal/util/apikey.go +++ b/internal/util/apikey.go @@ -9,14 +9,14 @@ package util import "math/rand" -const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +const charsAPIKey = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" // GenAPIKey returns a 48 char string. func GenAPIKey() string { // NOTE: "Good enough" b := make([]byte, 48) for i := range b { - b[i] = chars[rand.Int63()%int64(len(chars))] + b[i] = charsAPIKey[rand.Int63()%int64(len(charsAPIKey))] } return string(b) } -- 2.44.1