kraken
kraken copied to clipboard
replaced urlpush with sprintf to avoid beginning slash
Problem:
When calling .Diff() to compare two nodes, the extensions will contain a leading slash in their url (for example: <nodeid>:/type.googleapis.com/proto.blah/State). This is due to how URLPush() works. This will cause issues with the SME because it filters out any STATE_CHANGE events that contain extensions with a leading slash.
Solution:
I replaced URLPush() with sprintf to just append the extension url to the node id. I didn't do extensive testing on this, but it did fix the issue with the SME filtering out my events.
Feedback:
- figure out if we want all urls to begin with "/"
- make sure all url manipulation is happening in util.go