From 1d75bf7489527925217bd5611ba7910c0ffe077c Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Tue, 9 Apr 2024 18:39:14 -0400 Subject: profiles (#7) Reviewed-on: https://git.hatecomputers.club/hatecomputers/hatecomputers.club/pulls/7 Co-authored-by: Elizabeth Co-committed-by: Elizabeth --- utils/RandomId.go | 16 ---------------- utils/random_id.go | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 utils/RandomId.go create mode 100644 utils/random_id.go (limited to 'utils') diff --git a/utils/RandomId.go b/utils/RandomId.go deleted file mode 100644 index 1b03ec8..0000000 --- a/utils/RandomId.go +++ /dev/null @@ -1,16 +0,0 @@ -package utils - -import ( - "crypto/rand" - "fmt" -) - -func RandomId() string { - id := make([]byte, 16) - _, err := rand.Read(id) - if err != nil { - panic(err) - } - - return fmt.Sprintf("%x", id) -} diff --git a/utils/random_id.go b/utils/random_id.go new file mode 100644 index 0000000..1b03ec8 --- /dev/null +++ b/utils/random_id.go @@ -0,0 +1,16 @@ +package utils + +import ( + "crypto/rand" + "fmt" +) + +func RandomId() string { + id := make([]byte, 16) + _, err := rand.Read(id) + if err != nil { + panic(err) + } + + return fmt.Sprintf("%x", id) +} -- cgit v1.2.3-70-g09d2