kraken icon indicating copy to clipboard operation
kraken copied to clipboard

replaced urlpush with sprintf to avoid beginning slash

Open kpelzel opened this issue 5 years ago • 1 comments

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.

kpelzel avatar Nov 14 '19 01:11 kpelzel

Feedback:

  • figure out if we want all urls to begin with "/"
  • make sure all url manipulation is happening in util.go

kpelzel avatar Nov 15 '19 21:11 kpelzel