Skip to content

Commit

Permalink
Refactors session uuid to use google's package
Browse files Browse the repository at this point in the history
  • Loading branch information
brendensoares committed Mar 1, 2022
1 parent ee237a4 commit 5e99db8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions session/session.go
Expand Up @@ -8,7 +8,7 @@ import (
"encoding/hex"
"encoding/json"
"errors"
"github.com/twinj/uuid"
"github.com/google/uuid"
"reflect"
"strconv"
"strings"
Expand Down Expand Up @@ -49,9 +49,9 @@ func (s Session) ID() string {
return sessionIDStr.(string)
}

buffer := uuid.NewV4()
suuid := uuid.New()

s[SessionIDKey] = hex.EncodeToString(buffer.Bytes())
s[SessionIDKey] = hex.EncodeToString(suuid[0:])
return s[SessionIDKey].(string)
}

Expand Down

0 comments on commit 5e99db8

Please sign in to comment.