mirror of
https://github.com/openziti/zrok.git
synced 2025-08-18 03:39:58 +02:00
fix for service name creation (#79)
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"crypto/x509"
|
||||
"encoding/hex"
|
||||
errors2 "github.com/go-openapi/errors"
|
||||
"github.com/jaevor/go-nanoid"
|
||||
"github.com/openziti-test-kitchen/zrok/rest_model_zrok"
|
||||
"github.com/openziti/edge/rest_management_api_client"
|
||||
"github.com/openziti/edge/rest_util"
|
||||
@@ -48,7 +49,11 @@ func createToken() (string, error) {
|
||||
}
|
||||
|
||||
func createServiceName() (string, error) {
|
||||
return dnsSafeShortId()
|
||||
gen, err := nanoid.CustomASCII("abcdefghijklmnopqrstuvwxyz0123456789", 12)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return gen(), nil
|
||||
}
|
||||
|
||||
func dnsSafeShortId() (string, error) {
|
||||
|
Reference in New Issue
Block a user