Skip to content

Fix invalid format strings#832

Merged
SuperQ merged 1 commit into
prometheus:masterfrom
HNO3Miracle:fix-invalid-format-strings
Jun 30, 2026
Merged

Fix invalid format strings#832
SuperQ merged 1 commit into
prometheus:masterfrom
HNO3Miracle:fix-invalid-format-strings

Conversation

@HNO3Miracle

Copy link
Copy Markdown
Contributor

Fix invalid format strings reported by current Go vet.

This changes []uint64 error diagnostics to use %v instead of %q, and reports the original string field for parse errors in net_wireless and proc_cgroup instead of formatting the parsed integer zero value.

Tested:

  • make test

Signed-off-by: HNO3Miracle <xiangao.or@isrc.iscas.ac.cn>

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SuperQ

SuperQ commented Jun 30, 2026

Copy link
Copy Markdown
Member

Good find on some of those error returns that return the parsed value instead of the raw value.

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