gruntwork-io / go-commons

A standard library to use in all Gruntwork CLI tools
https://www.gruntwork.io/
MIT License
35 stars 26 forks source link

Add random string generation capabilities #26

Closed yorinasub17 closed 5 years ago

yorinasub17 commented 5 years ago

In the GCP bootstrap script I am currently developing, I have a need to generate a random string that I can use as a unique identifier for seeding the Project ID when creating a new project. I haven't seen us provide this as a library outside of terratest, so I ported a version of random.UniqueId here that is more generic, where you can control char sets and digits.

Note that this uses crypto/rand instead of math/rand, to allow for potential usage with password generation.

yorinasub17 commented 5 years ago

Ok addressed the question about being more clear about the usage. Will merge now and release. Thanks for the review!