This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dagger/dagger/utils.go
2021-02-08 15:10:32 -08:00

16 lines
214 B
Go

package dagger
import (
"crypto/rand"
"fmt"
)
func randomID(size int) (string, error) {
b := make([]byte, size)
_, err := rand.Read(b)
if err != nil {
return "", err
}
return fmt.Sprintf("%x", b), nil
}