1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-13 16:01:28 +05:30

pass: add utilities for encoding/decoding serverURL

While the implementation of these is fairly trivial, we want them
to remain the same. This patch adds utilities to handle the encoding
and decoding of the server-URLs.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-05-09 16:58:34 +02:00
parent f64d6b131b
commit d3ef442f59
2 changed files with 22 additions and 8 deletions
+1 -2
View File
@@ -3,7 +3,6 @@
package pass
import (
"encoding/base64"
"os"
"path"
"strings"
@@ -152,7 +151,7 @@ func TestPassHelperWithEmptyServer(t *testing.T) {
}
} else {
// No credentials; create an empty directory for this server.
serverURL := base64.URLEncoding.EncodeToString([]byte(cred.ServerURL))
serverURL := encodeServerURL(cred.ServerURL)
p := path.Join(getPassDir(), PASS_FOLDER, serverURL)
if err := os.Mkdir(p, 0o755); err != nil {
t.Error(err)