Refactor id generator to it's own package

This commit is contained in:
Jonathan Leibiusky @xetorthio
2017-09-14 10:20:20 -03:00
parent 3ca50eae2e
commit 86a0f7d1e9
9 changed files with 64 additions and 60 deletions

10
id/xid.go Normal file
View File

@@ -0,0 +1,10 @@
package id
import "github.com/rs/xid"
type XIDGenerator struct {
}
func (x XIDGenerator) NewId() string {
return xid.New().String()
}