fentiger, Oh, joy: it turns out that Go's
net/url
package doesn't understand that DID URLs can have paths.Parsing
"https://example.social/path/to/object"
gives me a useful result:&url.URL{<br></br> Scheme:"https",<br></br> Opaque:"",<br></br> Host:"example.social",<br></br> Path:"/path/to/object",<br></br> [...]<br></br>}
But parsing
"did:ap: key:z6abcdef/path/to/object"
gives me this:&url.URL{<br></br> Scheme:"did",<br></br> Opaque:"ap:key:z6abcdef/path/to/object",<br></br> Host:"",<br></br> Path:"",<br></br> [...]<br></br>}
So I need some kind of wrapper to detect DID URLs and parse the paths out of them. That's easy enough, I suppose, but then I need to actually use that wrapper, in all the relevant places...
Add comment