Skip to content

refactor: improve util.RandString and fix Dockerfile EXPOSE#383

Open
Kaustubh1204 wants to merge 6 commits intoapache:unstablefrom
Kaustubh1204:refactor-randstring
Open

refactor: improve util.RandString and fix Dockerfile EXPOSE#383
Kaustubh1204 wants to merge 6 commits intoapache:unstablefrom
Kaustubh1204:refactor-randstring

Conversation

@Kaustubh1204
Copy link
Contributor

This PR makes two small improvements:

  1. util.RandString

    • Uses the global math/rand generator (auto-seeded in Go 1.20+)
      instead of creating a new rand.Source on each call.
    • Adds strings.Builder.Grow(length) to reduce allocations.
    • Adds deterministic unit tests validating length and character set.
  2. Dockerfile

    • Changes EXPOSE 9379:9379 to EXPOSE 9379
      to align with Dockerfile syntax expectations.

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.

1 participant