Skip to content

Conversation

@S2BryanW
Copy link
Collaborator

@S2BryanW S2BryanW commented Nov 20, 2025

Make the environment variable prefix an exported variable so it can be overridden with a compile-time -X option. Clean up other names and error messages.

Changes default prefix from DISABLE_ to DISABLE_CODE_ to minimize potential conflicts with other use cases.

resolves #4

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for overriding the environment variable prefix used to disable code gates at compile time via the -ldflags -X build flag. The changes make the prefix configurable while also cleaning up internal naming and improving error messages.

Key Changes:

  • Converts the private gateEnvVarPrefix constant to an exported EnvVarPrefix variable with documentation on how to override it at build time
  • Changes the default prefix from "DISABLE_" to "DISABLE_CODE_"
  • Simplifies internal constant naming from gateNameMaxLength to nameMaxLength
  • Improves error message clarity for duplicate gate names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@S2BryanW S2BryanW force-pushed the prefix branch 3 times, most recently from 678835b to fc27609 Compare November 20, 2025 22:53
@S2BryanW S2BryanW requested a review from muir December 2, 2025 20:37
@S2BryanW S2BryanW force-pushed the prefix branch 2 times, most recently from 4a99d59 to a4acfd4 Compare December 2, 2025 21:29
@S2BryanW S2BryanW force-pushed the prefix branch 2 times, most recently from 4d7fc07 to d1155ac Compare December 2, 2025 22:04
@S2BryanW S2BryanW merged commit 3591223 into main Dec 3, 2025
4 checks passed
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.

Make gateEnvVarPrefix an exported variable

3 participants