Files
dolt/go/util/random/id.go
T
Aaron Boodman 8e64e636aa Introduce photo-dedup-by-date (#2826)
Introduce photo-dedup-by-date

This program deduplicates photos by the date they were taken. It considers two photos a group if they were separated by less than 5 seconds.
2016-11-15 14:07:57 -08:00

21 lines
315 B
Go

package random
import (
"crypto/rand"
"encoding/hex"
"github.com/attic-labs/noms/go/d"
)
var (
reader = rand.Reader
)
// Creates a unique ID which is a random 16 byte hex string
func Id() string {
data := make([]byte, 16)
_, err := reader.Read(data)
d.Chk.NoError(err)
return hex.EncodeToString(data)
}