Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tsenart
Copy link
Contributor

@tsenart tsenart commented Jun 11, 2022

This commit introduces a thread safe per process monotonically increase DefaultEntropy()
function as well as an easy to use Make() function, aimed at users
that want safe defaults chosen for them.

tsenart added 3 commits June 11, 2022 16:48
Users of this library have opened many issues regarding the difficulty
of choosing an entropy source that is safe for concurrent use.
This commit introduces a thread safe per process monotonically increase `DefaultEntropy()`
function as well as an easy to use `Make()` function, aimed at users
that want safe defaults chosen for them.
@tsenart tsenart requested a review from peterbourgon June 11, 2022 16:44
Copy link
Member

@peterbourgon peterbourgon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 1.

@tsenart tsenart merged commit 09b4b3e into master Jun 22, 2022
@tsenart tsenart deleted the ts/default-entropy branch June 22, 2022 15:26
@ganigeorgiev
Copy link

@peterbourgon Could you tag this for a new release?

@peterbourgon
Copy link
Member

@ganigeorgiev Check out v2.1.0-alpha.1 and gimme some feedback :)

@178inaba
Copy link

@peterbourgon
I also confirmed! I was able to use Make.

package main

import (
	"fmt"

	"github.com/oklog/ulid/v2"
)

func main() {
	fmt.Printf("ulid.Make(): %s\n", ulid.Make())
}
$ go get github.com/oklog/ulid/[email protected]
go: upgraded github.com/oklog/ulid/v2 v2.0.2 => v2.1.0-alpha.1

$ go run main.go
ulid.Make(): 01G7MSBEWS6WMSTABGZQ8W5W3S

@peterbourgon
Copy link
Member

https://github.com/oklog/ulid/releases/tag/v2.1.0 is released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants