Skip to content

docs: clarify boolean flag value syntax#2340

Open
JinRudy wants to merge 1 commit into
urfave:mainfrom
JinRudy:docs/bool-flag-value-syntax
Open

docs: clarify boolean flag value syntax#2340
JinRudy wants to merge 1 commit into
urfave:mainfrom
JinRudy:docs/bool-flag-value-syntax

Conversation

@JinRudy
Copy link
Copy Markdown

@JinRudy JinRudy commented May 26, 2026

What type of PR is this?

  • documentation

What this PR does / why we need it:

  • Clarifies that boolean flags are an exception to the space-separated value syntax.
  • Documents that --flag=false should be used when passing an explicit boolean value.

Which issue(s) this PR fixes:

Fixes #2206

Testing

  • git diff --check
  • go test ./...
  • PATH="$PWD/.local/bin:$PATH" go run scripts/build.go gfmrun docs/v3/examples/flags/basics.md

Release Notes

Clarified boolean flag value syntax in the v3 flags documentation.

- 补充布尔标志不能用空格传递显式 false 的说明
- 指明需要使用 --flag=false 形式传入布尔值
@JinRudy JinRudy requested a review from a team as a code owner May 26, 2026 05:50
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.

The boolean flag is not behaving as intended.

1 participant