-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add exclude and grep functions #11
Conversation
outputs = append(outputs, serie) | ||
} | ||
} | ||
return outputs, nil |
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.
Is it okay to return an empty slice? Should we provide a warning if it's empty?
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.
Yes, an empty slice is fine. No need to warn.
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.
I looked around guess convention is to send back empty. (y)
"this", | ||
[]string{"series.name.this.ok"}, | ||
[]string{"series.name.this.ok"}, | ||
[]string{}, |
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.
On the same idea, do we need a test to specify what happens when grep finds nothing?
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 test has an "exclude" that excludes everything. It's the same code at that point.
lgtm, I wonder if there'll be problems with regex escaping or specialized names, but I don't know enough about the project :P |
No description provided.