16 lines
231 B
Go
16 lines
231 B
Go
package id
|
|
|
|
import "github.com/google/uuid"
|
|
|
|
type UUIDGenerator struct {
|
|
}
|
|
|
|
func NewUUIDGenerator() IDGenerator {
|
|
return &UUIDGenerator{}
|
|
}
|
|
|
|
func (g *UUIDGenerator) generate() string {
|
|
id, _ := uuid.NewV7()
|
|
return id.String()
|
|
}
|