// mustGetUUID - get a random UUID. func mustGetUUID() string { uuid, err := uuid.New() if err != nil { panic(fmt.Sprintf("Random UUID generation failed. Error: %s", err)) } return uuid.String() }
// getUUID() - get a unique uuid. func getUUID() (uuidStr string) { for { uuid, err := uuid.New() if err != nil { errorIf(err, "Unable to initialize uuid") continue } uuidStr = uuid.String() break } return uuidStr }