Skip to content

Conversation

@lrstanley-x
Copy link

@lrstanley-x lrstanley-x bot commented Sep 1, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
github.com/brianvoe/gofakeit/v7 v7.3.0 -> v7.12.1 age adoption passing confidence

Release Notes

brianvoe/gofakeit (github.com/brianvoe/gofakeit/v7)

v7.12.1

Compare Source

v7.12.0

Compare Source

v7.11.0

Compare Source

v7.10.0

Compare Source

v7.9.0: ID Generator

Compare Source

New: ID() — Fast, Human-Readable Random Identifier

(GoFakeIt v7.9.0)

gofakeit.ID() is a new high-performance identifier generator designed for speed, readability, and practically zero collision probability.

Unlike UUID v4 or XID, this generator is intentionally random-first, not structure-based.
Perfect for mock APIs, test data, fixtures, seed data, and temporary identifiers.


Highlights

  • Human readable alphabet, no confusing characters
    23456789abcdefghjkmnpqrstuvwxyz (no 1, l, i or 0, o to alleviate confusion)
  • Fast
  • Memory Allocation
  • Generates from your rand source
  • Shorter than UUID, faster than XID, and requires no coordination

Example

id := gofakeit.ID()
fmt.Println(id)
// → "3t9qf4c92npxhw7bg6y0"

Performance Benchmarks

Measured on Go 1.25

Generator / Function Benchmark Name ops/sec ns/op B/op allocs/op
gofakeit.ID() BenchmarkID-10 31,383,146 37.8 ns 24 1
gofakeit.UUIDv4() BenchmarkUUIDv4-10 22,131,577 53.8 ns 48 1
github.com/rs/xid BenchmarkXID-10 16,190,817 74.2 ns 0 0
github.com/google/uuid (v4) BenchmarkGoogleUUIDv4-10 3,098,770 386.1 ns 64 2

Takeaway: gofakeit.ID() is ~2× faster than XID and ~10× faster than UUID v4, while being shorter and human-readable.


Collision Probability (Randomness Math)

  • ID length: 20 characters
  • Alphabet: 32 slots with one duplicated character (intentional) → avoids retries, maximizes speed
  • Effective entropy: ≈ 98.25 bits

Even under very large bursts, duplication is astronomically unlikely

Collision probability when generating n IDs within 1 second (birthday bound)
n (IDs in 1s) gofakeit.ID() collision probability
100,000 0.00000000000000000001326
1,000,000 0.000000000000000001326017
10,000,000 0.000000000000000132601736
100,000,000 0.000000000000013260173678
1,000,000,000 0.000000000001326017367838

For comparison (same n):

  • UUID v4 (122 bits): much lower probabilities (but significantly slower and longer)
  • XID: structural uniqueness (time + machine + pid + counter). Treat collisions as operationally zero when configured normally.

Need structural, sortable IDs? Use XID or Snowflake.
Want random, readable, fast? Use gofakeit.ID().


RNG Behavior

Mode Behavior
Default (gofakeit.ID()) PCG for speed, seeded via crypto/rand → fast + unpredictable
Full crypto (NewFaker(source.NewCrypto())) crypto/rand for every ID → maximum randomness (slower)
Deterministic (New(seed)) PCG with fixed seed → reproducible ID sequences (useful for tests/fixtures)

We seed PCG with a cryptographic seed when seed == 0. This prevents accidental identical streams across processes/containers.


Example Usage

package main

import (
	"fmt"

	"github.com/brianvoe/gofakeit/v7"
	"github.com/brianvoe/gofakeit/v7/source"
)

func main() {
	// Fast ID — PCG, automatically crypto-seeded
	fmt.Println("fast ID:", gofakeit.ID())

	// Cryptographically secure per-ID RNG
	crypto := source.NewCrypto()
	faker := gofakeit.NewFaker(crypto, true)
	fmt.Println("crypto ID:", faker.ID())
}

v7.8.2

Compare Source

v7.8.1

Compare Source

v7.8.0

Compare Source

v7.7.3

Compare Source

v7.7.2

Compare Source

v7.7.1

Compare Source

v7.7.0

Compare Source

v7.6.0

Compare Source

v7.5.1

Compare Source

v7.5.0

Compare Source

v7.4.0

Compare Source


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

PR generated using automation.

@lrstanley-x lrstanley-x bot requested a review from lrstanley September 1, 2025 05:04
@lrstanley-x
Copy link
Author

lrstanley-x bot commented Sep 1, 2025

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: _examples/go.sum
Command failed: go get -t ./...
go: downloading github.com/brianvoe/gofakeit/v7 v7.12.1
go: github.com/lrstanley/entrest/_examples/simple imports
	github.com/lrstanley/entrest/_examples/simple/internal/database/ent: cannot find module providing package github.com/lrstanley/entrest/_examples/simple/internal/database/ent
go: github.com/lrstanley/entrest/_examples/simple imports
	github.com/lrstanley/entrest/_examples/simple/internal/database/ent/rest: cannot find module providing package github.com/lrstanley/entrest/_examples/simple/internal/database/ent/rest
go: github.com/lrstanley/entrest/_examples/simple imports
	github.com/lrstanley/entrest/_examples/simple/internal/database/ent/runtime: cannot find module providing package github.com/lrstanley/entrest/_examples/simple/internal/database/ent/runtime

@codecov
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.23%. Comparing base (07961d7) to head (ef78d78).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
- Coverage   69.37%   69.23%   -0.14%     
==========================================
  Files          10       10              
  Lines        2436     2022     -414     
==========================================
- Hits         1690     1400     -290     
+ Misses        632      508     -124     
  Partials      114      114              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lrstanley-x lrstanley-x bot force-pushed the renovate/github.com-brianvoe-gofakeit-v7-7.x branch from 3032950 to bf648a6 Compare September 15, 2025 05:04
@lrstanley-x lrstanley-x bot changed the title feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.5.1) feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.6.0) Sep 15, 2025
@lrstanley-x lrstanley-x bot force-pushed the renovate/github.com-brianvoe-gofakeit-v7-7.x branch from bf648a6 to e8eb933 Compare October 1, 2025 05:04
@lrstanley-x lrstanley-x bot changed the title feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.6.0) feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.7.3) Oct 1, 2025
@lrstanley-x lrstanley-x bot force-pushed the renovate/github.com-brianvoe-gofakeit-v7-7.x branch from e8eb933 to a3874f6 Compare October 15, 2025 05:04
@lrstanley-x lrstanley-x bot changed the title feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.7.3) feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.8.0) Oct 15, 2025
@lrstanley-x lrstanley-x bot force-pushed the renovate/github.com-brianvoe-gofakeit-v7-7.x branch from a3874f6 to c0684c4 Compare November 1, 2025 05:04
@lrstanley-x lrstanley-x bot changed the title feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.8.0) feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.8.2) Nov 1, 2025
@lrstanley-x lrstanley-x bot force-pushed the renovate/github.com-brianvoe-gofakeit-v7-7.x branch from c0684c4 to 8e0ec79 Compare November 15, 2025 05:03
@lrstanley-x lrstanley-x bot changed the title feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.8.2) feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.9.0) Nov 15, 2025
@lrstanley-x lrstanley-x bot force-pushed the renovate/github.com-brianvoe-gofakeit-v7-7.x branch from 8e0ec79 to c8c13c2 Compare December 1, 2025 05:10
@lrstanley-x lrstanley-x bot changed the title feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.9.0) feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.12.0) Dec 1, 2025
Signed-off-by: lrstanley-x[bot] <153159847+lrstanley-x[bot]@users.noreply.github.com>
@lrstanley-x lrstanley-x bot force-pushed the renovate/github.com-brianvoe-gofakeit-v7-7.x branch from c8c13c2 to ef78d78 Compare December 15, 2025 05:06
@lrstanley-x lrstanley-x bot changed the title feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.12.0) feat(go): update github.com/brianvoe/gofakeit/v7 (v7.3.0 → v7.12.1) Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant