Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted small fixups #380

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Assorted small fixups #380

wants to merge 5 commits into from

Conversation

kolyshkin
Copy link

Nothing dramatic; please see individual commits for details.

Commit 1cd6182 added this check, but the len built-in never
returns negative values.

Change the check to len() == 0.

Fixes: 1cd6182
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This mostly fixes some code snippets in godoc strings.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This fixes some whitespace issues, and in general improves code
formatting.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
All these places have two problems:

1. Using fprintf with no %-like format specifiers.
2. Missing newline.

Fix both by switching to fprintln.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@CLAassistant
Copy link

CLAassistant commented Jun 21, 2023

CLA assistant check
All committers have signed the CLA.

Before this commit, go test fails like this:

	./flag_test.go:1241:3: fmt.Println arg list ends with redundant newline
	FAIL	github.com/spf13/pflag [build failed]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
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.

2 participants