cue icon indicating copy to clipboard operation
cue copied to clipboard

pkg/net: add Path{E,Une}sape and Query{E,Une}scape

Open eraserhd opened this issue 3 years ago • 5 comments

This adds the following four user functions to the net package:

  • PathEscape
  • PathUnescape
  • QueryEscape
  • QueryUnescape

These functions are identical to the Go std functions by the same name in net/url. In fact, the documentation has been copied from them.

eraserhd avatar May 04 '22 19:05 eraserhd

Oh, I forgot to mention: This came up when needing to encode a password to construct a PostgreSQL URL.

eraserhd avatar May 04 '22 19:05 eraserhd

Hi @eraserhd - thanks for the contribution!

Per the contribution guide, please can you link the issue where this was discussed and agreed?

myitcv avatar May 05 '22 14:05 myitcv

@myitcv I missed the contribution guide, so now there's issue #1699.

eraserhd avatar May 05 '22 17:05 eraserhd

Please mention in the commit message that it "Fixes #1695".

mpvl avatar May 17 '22 10:05 mpvl

@mpvl I think you mean "Fixes #1699", which I've added.

eraserhd avatar Jun 11 '22 12:06 eraserhd

@eraserhd apologies for the slowness on our side. Are you able to rebase and solve the testdata conflicts? No worries if not - I can do that on my side next week if you haven't gotten to it.

mvdan avatar Apr 03 '23 17:04 mvdan

@mpvl rebased and tests pass

eraserhd avatar Apr 19 '23 12:04 eraserhd