service name refactoring (#59)

This commit is contained in:
Michael Quigley
2022-09-14 14:16:37 -04:00
parent 366f7db982
commit 54b4161045
2 changed files with 4 additions and 4 deletions

View File

@ -46,10 +46,10 @@ func createToken() string {
return shortuuid.New()
}
func randomId() (string, error) {
bytes := make([]byte, 8)
func createServiceName() (string, error) {
bytes := make([]byte, 4)
if _, err := rand.Read(bytes); err != nil {
return "", errors.Wrap(err, "error generating random identity id")
return "", errors.Wrap(err, "error generating service name")
}
return hex.EncodeToString(bytes), nil
}