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

core, api: store labels case-insensitive #794

Merged
merged 4 commits into from
Oct 13, 2017

Conversation

Connor1996
Copy link
Member

case-insensitive when comparing StoreLabel.key, the string store in StoreLabel is still case-sensitive

if label.GetKey() == key {
return label.GetValue()
if strings.EqualFold(label.GetKey(), key) {
return strings.ToLower(label.GetValue())
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer returning label.GetValue() here, use strings.EqualFold outside to compare.

Copy link
Contributor

@disksing disksing left a comment

Choose a reason for hiding this comment

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

LGTM

@siddontang
Copy link
Contributor

PTAL @huachaohuang

Copy link
Contributor

@huachaohuang huachaohuang left a comment

Choose a reason for hiding this comment

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

LGTM

@huachaohuang
Copy link
Contributor

/run-integration-tests

@disksing
Copy link
Contributor

/run-integration-tests

@siddontang siddontang merged commit 0297761 into master Oct 13, 2017
@siddontang siddontang deleted the connor/store-labels-case-insensitive branch October 13, 2017 09: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.

4 participants