8000 refactor: pair server flag and env bindings in one table by lewtec-bot[bot] · Pull Request #106 · fetchurl/fetchurl · GitHub
[go: up one dir, main page]

Skip to content

refactor: pair server flag and env bindings in one table - #106

Open
lewtec-bot[bot] wants to merge 1 commit into
mainfrom
janitor/server-flag-env-bindings
Open

lewtec-bot[bot] wants to merge 1 commit into
mainfrom
janitor/server-flag-env-bindings

Conversation

@lewtec-bot
@lewtec-bot lewtec-bot Bot commented Sep 24, 2026
Copy link
Copy Markdown
Contributor

Problem

Server startup registered each flag and each FETCHURL_* variable as two separate lists in cmd/fetchurl/server.go init. A new setting added to only one list would accept the flag or the env var, but not both.

Change

One table drives both BindPFlag and BindEnv. Flags are still bound before envs. Flag names, defaults, and env names are unchanged.

Verify

mise exec -- go test ./cmd/fetchurl -count=1 -p 1

The flag list and the FETCHURL_* list were maintained separately, so a
new setting could be wired to only one of them.
@lewtec-bot
lewtec-bot Bot requested a review from lucasew September 24, 2026 08:35
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

0