Remove randStr private utility function
This commit is contained in:
parent
8c3e6a2845
commit
6d99fb5368
@ -1,14 +0,0 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
)
|
||||
|
||||
func randStr(l int) string {
|
||||
b := make([]byte, l)
|
||||
if _, err := rand.Read(b); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return hex.EncodeToString(b)
|
||||
}
|
@ -192,7 +192,7 @@ func instatiateNetwork(
|
||||
stateDir: stateDir,
|
||||
runtimeDir: runtimeDir,
|
||||
opts: opts.withDefaults(),
|
||||
garageAdminToken: randStr(32),
|
||||
garageAdminToken: toolkit.RandStr(32),
|
||||
shutdownCh: make(chan struct{}),
|
||||
}
|
||||
}
|
||||
@ -346,7 +346,7 @@ func Create(
|
||||
return nil, fmt.Errorf("creating nebula CA cert: %w", err)
|
||||
}
|
||||
|
||||
garageRPCSecret := randStr(32)
|
||||
garageRPCSecret := toolkit.RandStr(32)
|
||||
|
||||
n := instatiateNetwork(
|
||||
logger,
|
||||
|
Loading…
Reference in New Issue
Block a user