mirror of
https://github.com/dolthub/dolt.git
synced 2026-04-28 04:28:53 -05:00
8e64e636aa
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.
21 lines
315 B
Go
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)
|
|
}
|