feat: add supervisor prototype with embedded frontend
This commit is contained in:
12
internal/util/ids.go
Normal file
12
internal/util/ids.go
Normal file
@ -0,0 +1,12 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
)
|
||||
|
||||
func NewID(prefix string) string {
|
||||
buf := make([]byte, 8)
|
||||
_, _ = rand.Read(buf)
|
||||
return prefix + "_" + hex.EncodeToString(buf)
|
||||
}
|
||||
Reference in New Issue
Block a user