fix: add comments
This commit is contained in:
@@ -2,12 +2,15 @@ package entity
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
//ID entity ID
|
||||
type ID = uuid.UUID
|
||||
|
||||
//NewID create a new entity ID
|
||||
func NewID() ID {
|
||||
return ID(uuid.New())
|
||||
}
|
||||
|
||||
//StringToID convert a string to an entity ID
|
||||
func StringToID(s string) (ID, error) {
|
||||
id, err := uuid.Parse(s)
|
||||
return ID(id), err
|
||||
|
||||
Reference in New Issue
Block a user