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:
+1
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user