Create common errorID generation (#788)

This commit is contained in:
Louis Ruch authored and GitHub committed 2020-11-16 13:51:11 -08:00
1 parent d8020842ae
commit b8a5b9adf1
2 files changed
+23

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package main
import (
"fmt"
"os"
"github.com/hashicorp/vault/sdk/helper/base62"
)
const idLength = 10
func main() {
rand, err := base62.Random(idLength)
if err != nil {
fmt.Printf("failed to generate error ID: %v\n", err)
os.Exit(1)
}
fmt.Println(rand)
}