Add user's id.

This commit is contained in:
Yang Luo
2021-02-13 20:10:41 +08:00
parent 34f87c78d8
commit 6e015a959f
5 changed files with 35 additions and 0 deletions

View File

@ -17,6 +17,8 @@ package util
import (
"errors"
"strings"
"github.com/google/uuid"
)
func GetOwnerAndNameFromId(id string) (string, string) {
@ -27,3 +29,7 @@ func GetOwnerAndNameFromId(id string) (string, string) {
return tokens[0], tokens[1]
}
func GenerateId() string {
return uuid.NewString()
}