diff --git a/rpc/server.go b/rpc/server.go index 11f5db1..01078a2 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -50,6 +50,5 @@ func NewServer(c *Conf) *Server { opts = append(opts, grpc.Timeout(c.Timeout.AsDuration())) } srv := grpc.NewServer(opts...) - return srv } diff --git a/tools/utils.go b/tools/utils.go index 9b8ce02..c7c3838 100644 --- a/tools/utils.go +++ b/tools/utils.go @@ -18,7 +18,6 @@ import ( "time" pkgstrings "github.com/go-bamboo/pkg/strings" - "github.com/google/uuid" "golang.org/x/crypto/bcrypt" ) @@ -75,11 +74,6 @@ func IsStringEmpty(str string) bool { return strings.Trim(str, " ") == "" } -func GetUUID() string { - u := uuid.New() - return strings.ReplaceAll(u.String(), "-", "") -} - // func PathExists(path string) bool { // _, err := os.Stat(path) // if err == nil { diff --git a/uuid/uuid.go b/uuid/uuid.go new file mode 100644 index 0000000..653780a --- /dev/null +++ b/uuid/uuid.go @@ -0,0 +1,11 @@ +package uuid + +import ( + "github.com/google/uuid" + "strings" +) + +func New() string { + u := uuid.New() + return strings.ReplaceAll(u.String(), "-", "") +}