Skip to content

Commit

Permalink
feat: uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
emberfarkas committed Aug 23, 2023
1 parent 813080c commit 8d5bff2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
1 change: 0 additions & 1 deletion rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,5 @@ func NewServer(c *Conf) *Server {
opts = append(opts, grpc.Timeout(c.Timeout.AsDuration()))
}
srv := grpc.NewServer(opts...)

return srv
}
6 changes: 0 additions & 6 deletions tools/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"time"

pkgstrings "github.com/go-bamboo/pkg/strings"
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
)

Expand Down Expand Up @@ -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 {
Expand Down
11 changes: 11 additions & 0 deletions uuid/uuid.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package uuid

import (
"github.com/google/uuid"
"strings"
)

func New() string {
u := uuid.New()
return strings.ReplaceAll(u.String(), "-", "")
}

0 comments on commit 8d5bff2

Please sign in to comment.