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

fixes a badly referenced variable name in StepEvaluator code #3996

Merged
merged 1 commit into from
Jul 19, 2021

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Jul 14, 2021

While poking around some sharding code I noticed a variable was referenced incorrectly. This didn't result in a bug, but made reading this piece of code confusing/counterintuitive. This PR fixes the variable naming and gives the interface a hint.

cc @jeschkies in case you're curious

@@ -9,7 +9,7 @@ import (
// StepEvaluator evaluate a single step of a query.
type StepEvaluator interface {
// while Next returns a promql.Value, the only acceptable types are Scalar and Vector.
Next() (bool, int64, promql.Vector)
Next() (ok bool, ts int64, vec promql.Vector)
Copy link
Contributor

Choose a reason for hiding this comment

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

Neat! I didn't know one could name return parameters.

@sandeepsukhani sandeepsukhani merged commit b58e9cd into grafana:main Jul 19, 2021
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.

3 participants