path.Join strips a slash from url prefix

2,362 views
Skip to first unread message

james0...@gmail.com

unread,
Jan 8, 2016, 8:37:09 AM1/8/16
to golang-nuts
Using path.Join to work with URLs fails:

https://play.golang.org/p/rYlKpTIfQ7

Is there a suitable path joiner for this case?

Jesse McNelis

unread,
Jan 8, 2016, 8:56:40 AM1/8/16
to james0...@gmail.com, golang-nuts
If you're dealing with urls then the net/url package is what you want.
https://play.golang.org/p/ndjMiEGlSr
Reply all
Reply to author
Forward
0 new messages