Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Adds ability to pass through []string key #32

Merged
merged 1 commit into from
Oct 10, 2016
Merged

Conversation

IRCody
Copy link
Contributor

@IRCody IRCody commented Sep 30, 2016

Utilizes new proto field to pass through []string key so that . can
be used in namespaces.

Depends on #1248 being merged into snap.

Utilizes new proto field to pass through []string key so that `.` can
be used in namespaces.
@@ -61,7 +61,10 @@ func (c *ConfigPolicy) AddNewIntRule(ns []string, key string, req bool, opts ...
}
k := strings.Join(ns, ".")
if c.integerRules[k] == nil {
c.integerRules[k] = &rpc.IntegerPolicy{Rules: map[string]*rpc.IntegerRule{}}
c.integerRules[k] = &rpc.IntegerPolicy{
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we want c.integerRules[k] to be a slice instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. It uses this format to maintain backward compatibility.

@kindermoumoute
Copy link
Contributor

LGTM

@kindermoumoute
Copy link
Contributor

Still Good To Me.

@IRCody IRCody merged commit 74a9f2c into intelsdi-x:master Oct 10, 2016
@IRCody IRCody mentioned this pull request Oct 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants