woodpecker-autoscaler/internal/utils/utils.go
Tobias Trabelsi 7f2c465391
All checks were successful
ci/woodpecker/pr/pr Pipeline was successful
implemented spawning of new agents
split pipeline
2023-10-31 23:18:08 +01:00

18 lines
310 B
Go

package utils
import "math/rand"
const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
func RandStringBytes(n int) string {
b := make([]byte, n)
for i := range b {
b[i] = letterBytes[rand.Intn(len(letterBytes))]
}
return string(b)
}
func BoolPointer(b bool) *bool {
return &b
}