+ Added a lib for generating UUIDs
+ Added a tool function for getting random UUIDs
This commit is contained in:
Thorsten Sommer 2014-11-09 15:04:52 +01:00
parent 1f82828c82
commit da6c7b53c7

View File

@ -1,6 +1,7 @@
package Tools
import (
"github.com/twinj/uuid"
"math/rand"
)
@ -8,3 +9,9 @@ func RandomInteger(max int) (rnd int) {
rnd = rand.Intn(max)
return
}
func RandomGUID() (guidString string) {
guidString = uuid.NewV4().String()
guidString = guidString[1 : len(guidString)-1]
return
}