Skip to content

Allow explicit empty values for slice flags - #512

Closed
jaideeppyne wants to merge 1 commit into
spf13:masterfrom
jaideeppyne:fix/222-empty-slices
Closed

jaideeppyne wants to merge 1 commit into
spf13:masterfrom
jaideeppyne:fix/222-empty-slices

Conversation

@jaideeppyne

Copy link
Copy Markdown

Fixes #222.

Treats --flag= as an explicit non-nil empty slice for duration and numeric slice flags, matching the existing bool, string, IP, and CIDR slice behavior. An absent flag still preserves nil, empty, and populated defaults, while repeated slice flags retain their append semantics.

The table-driven regression test covers every slice flag type.

Tests: go test ./..., go vet ./...

@CLAassistant

CLAassistant commented Sep 19, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@jaideeppyne

Copy link
Copy Markdown
Author

Withdrawing because the required CLA cannot be completed as part of this contribution.

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.

Can't pass empty int slices

2 participants