Add GetOwnerAndNameFromIdNoCheck() to fix bug.

This commit is contained in:
Yang Luo
2021-09-05 23:38:37 +08:00
parent ea8971ff29
commit 90ec8ec787
2 changed files with 8 additions and 3 deletions

View File

@ -43,6 +43,11 @@ func GetOwnerAndNameFromId(id string) (string, string) {
return tokens[0], tokens[1]
}
func GetOwnerAndNameFromIdNoCheck(id string) (string, string) {
tokens := strings.SplitN(id, "/", 2)
return tokens[0], tokens[1]
}
func GenerateId() string {
return uuid.NewString()
}