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

Add exclude and grep functions #11

Merged
merged 1 commit into from
Jan 19, 2018
Merged

Conversation

shanson7
Copy link

No description provided.

outputs = append(outputs, serie)
}
}
return outputs, nil

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?

Copy link
Author

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.

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{},

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?

Copy link
Author

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.

@Aergonus
Copy link

lgtm, I wonder if there'll be problems with regex escaping or specialized names, but I don't know enough about the project :P

@Aergonus Aergonus merged commit ea3b672 into feature_grepExclude Jan 19, 2018
@Aergonus Aergonus deleted the grepExclude branch January 19, 2018 18:31
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