Skip to content

Commit ef6c4b8

Browse files
Brandon Honeycuttclaude
andcommitted
docs: improve version variable documentation in main.go
Enhanced the comment for the version variable to better explain: - How the version is set via ldflags during build - The exact ldflag format used (-X main.version=<version>) - That "dev" is the default for local development builds This makes it clearer for contributors how the version system works. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 6a83e2a commit ef6c4b8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/hosts-manager/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ var (
2020
cfg *config.Config
2121
verbose bool
2222
dryRun bool
23-
version = "dev" // Will be overridden by ldflags during build
23+
// version is set via ldflags during build: -X main.version=<version>
24+
// Defaults to "dev" for local development builds
25+
version = "dev"
2426
)
2527

2628
func main() {

0 commit comments

Comments
 (0)