couchbaselabs / couchbaselabs/cbgt

using internal rand.Rand?

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Idea from Brett Lawson...

Noticed this in CBGT:
"NOTE: This library initializes math's random seed (rand.Seed(time.Now().UTC().UnixNano())) for unique id generation."
Why not use an internal rand.Rand?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue identifies CBGT's use of math/rand.Seed(time.Now().UTC().UnixNano()) for unique ID generation, but names no file or test. Start by locating that seed call in the moved cbgt repository and determine how random values are used; done would mean the proposed internal rand.Rand approach is implemented without the global seed side effect and is covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.