-
Notifications
You must be signed in to change notification settings - Fork 106
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
Support unmarshalling an atomic Notification
for ordered lists.
#851
Conversation
Involves supporting `DeleteNode` at the container above the list for ordered maps.
Changes unknown when pulling 9a0eadf on support-unmarshal-notifs-orderedmaps into ** on master**. |
// matches the prefix. | ||
// | ||
// e.g. a/b partially matches a/b/c or a/b, but doesn't match a/c. | ||
func PathPartiallyMatchesPrefix(path *gpb.Path, prefix []string) bool { |
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.
nit: somehow include that no keys are compared in the function name
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.
Done.
// | ||
// e.g. a/b partially matches a/b/c or a/b, but doesn't match a/c. | ||
func PathPartiallyMatchesPrefix(path *gpb.Path, prefix []string) bool { | ||
for len(prefix) != 0 && prefix[len(prefix)-1] == "" { |
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.
when are there empty strings in path?
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 is just to guard against a trailing slash when splitting. I wouldn't have written this myself -- it is kept in uniformity with the existing PathMatchesPrefix
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 is just to guard against a trailing slash when splitting. I wouldn't have written this myself -- it is kept in uniformity with the existing PathMatchesPrefix
Involves supporting
DeleteNode
at the container above the list for ordered maps.