Create common errorID generation (#788)
This commit is contained in:
1 parent
d8020842ae
commit
b8a5b9adf1
2 files changed
+23
No files matched your search
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user