-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixes 498 #499
Fixes 498 #499
Conversation
…tutil Signed-off-by: PhilipGough <[email protected]>
0aba90e
to
9e38e67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice, thanks. Just nits about the doc comment.
prometheus/testutil/testutil.go
Outdated
// text format and creates a readable error message from the result. | ||
func notMatchingError(got, want []*dto.MetricFamily) error { | ||
// compare encodes both provided slices of metric families into the | ||
// text format compares their string message and returns an error if they do not match. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: commas after "format" and "message".
prometheus/testutil/testutil.go
Outdated
func notMatchingError(got, want []*dto.MetricFamily) error { | ||
// compare encodes both provided slices of metric families into the | ||
// text format compares their string message and returns an error if they do not match. | ||
// In case of error, prints a readable error message from the result. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds like it would call fmt.Println
or something. Perhaps just mention that the returned error will contain the encoded text of both, got and want.
Signed-off-by: PhilipGough <[email protected]>
9e38e67
to
f9739b3
Compare
@beorn7 thanks, amended! |
Thanks, too. Merging now... |
Fixes #498
@beorn7 is this close to what you had in mind? If not let me know and I can revise.