First local go service
This commit is contained in:
18
api/pkg/common/uuid/uuid.go
Normal file
18
api/pkg/common/uuid/uuid.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package uuid
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
type Gen interface {
|
||||
Create() string
|
||||
}
|
||||
|
||||
type uuidGen struct {
|
||||
}
|
||||
|
||||
func New() *uuidGen {
|
||||
return &uuidGen{}
|
||||
}
|
||||
|
||||
func (u uuidGen) Create() string {
|
||||
return uuid.New().String()
|
||||
}
|
Reference in New Issue
Block a user