Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a generator's constructor with custom io.Reader as rand data source #114

Closed
inaneverb opened this issue Jan 12, 2023 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@inaneverb
Copy link

Hello.

So, it's likely proposal and discussion start. Don't you mind to add a generator's constructor that allows to specify custom rand data source? Something like this:

func NewGenWithRand(r io.Reader) *Gen {
	return &Gen{
		epochFunc:  time.Now,
		hwAddrFunc: defaultHWAddrFunc,
		rand:       r,
	}
}
@cameracker
Copy link
Collaborator

Hi, this PR grants the ability to provide option functions to a generator constructor

https://github.com/gofrs/uuid/pull/111/files

Does this meet your usecase?

@cameracker
Copy link
Collaborator

Closing as resolved, please let me know if it turns out the functionality doesn't work for you!

@cameracker cameracker added the enhancement New feature or request label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants