aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-01-28 17:51:00 +0000
committerr <r@freesoftwareextremist.com>2020-01-28 17:58:29 +0000
commit2af37d47783aac8c650ffd1578e2297b5784c73d (patch)
tree7b5c7a4b2fa530285bfaa16324e818d97dd00408 /util
parent57d2a4288b02fd1245ee85ae629649798578cf6c (diff)
downloadbloat-2af37d47783aac8c650ffd1578e2297b5784c73d.tar.gz
bloat-2af37d47783aac8c650ffd1578e2297b5784c73d.zip
Refactor everything
Diffstat (limited to 'util')
-rw-r--r--util/rand.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/rand.go b/util/rand.go
index ffe97a0..1e4ec95 100644
--- a/util/rand.go
+++ b/util/rand.go
@@ -10,7 +10,7 @@ var (
runes_length = len(runes)
)
-func NewRandId(n int) (string, error) {
+func NewRandID(n int) (string, error) {
data := make([]rune, n)
for i := range data {
num, err := rand.Int(rand.Reader, big.NewInt(int64(runes_length)))
@@ -22,10 +22,10 @@ func NewRandId(n int) (string, error) {
return string(data), nil
}
-func NewSessionId() (string, error) {
- return NewRandId(24)
+func NewSessionID() (string, error) {
+ return NewRandID(24)
}
func NewCSRFToken() (string, error) {
- return NewRandId(24)
+ return NewRandID(24)
}