Skip to content

docs: clarify boolean flag value syntax - #2340

Merged
dearchap merged 1 commit into
urfave:mainfrom
JinRudy:docs/bool-flag-value-syntax
Jun 11, 2026
Merged

docs: clarify boolean flag value syntax#2340
dearchap merged 1 commit into
urfave:mainfrom
JinRudy:docs/bool-flag-value-syntax

Conversation

@JinRudy

@JinRudy JinRudy commented May 26, 2026

Copy link
Copy Markdown
Contributor

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
@dearchap
dearchap merged commit 3a78572 into urfave:main Jun 11, 2026
9 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.

The boolean flag is not behaving as intended.

2 participants