mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-13 16:01:28 +05:30
[SYNTAX] Run gofmt on changed files
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
|||||||
|
|
||||||
// Credentials holds the information shared between docker and the credentials store.
|
// Credentials holds the information shared between docker and the credentials store.
|
||||||
type Credentials struct {
|
type Credentials struct {
|
||||||
Label string
|
Label string
|
||||||
ServerURL string
|
ServerURL string
|
||||||
Username string
|
Username string
|
||||||
Secret string
|
Secret string
|
||||||
@@ -20,7 +20,7 @@ type Credentials struct {
|
|||||||
|
|
||||||
// Docker credentials should be labeled as such in credential stores, this label
|
// Docker credentials should be labeled as such in credential stores, this label
|
||||||
// allow us to filter out non-Docker credentials at lookup
|
// allow us to filter out non-Docker credentials at lookup
|
||||||
const CredsLabel = "Docker Credentials"
|
const CredsLabel = "Docker Credentials"
|
||||||
|
|
||||||
// Serve initializes the credentials helper and parses the action argument.
|
// Serve initializes the credentials helper and parses the action argument.
|
||||||
// This function is designed to be called from a command line interface.
|
// This function is designed to be called from a command line interface.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ func TestSecretServiceHelper(t *testing.T) {
|
|||||||
ServerURL: "https://foobar.docker.io:2376/v1",
|
ServerURL: "https://foobar.docker.io:2376/v1",
|
||||||
Username: "foobar",
|
Username: "foobar",
|
||||||
Secret: "foobarbaz",
|
Secret: "foobarbaz",
|
||||||
Label: credentials.CredsLabel,
|
Label: credentials.CredsLabel,
|
||||||
}
|
}
|
||||||
|
|
||||||
helper := Secretservice{}
|
helper := Secretservice{}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package wincred
|
package wincred
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
winc "github.com/danieljoos/wincred"
|
winc "github.com/danieljoos/wincred"
|
||||||
"github.com/docker/docker-credential-helpers/credentials"
|
"github.com/docker/docker-credential-helpers/credentials"
|
||||||
"bytes"
|
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ func (h Wincred) Add(creds *credentials.Credentials) error {
|
|||||||
g.UserName = creds.Username
|
g.UserName = creds.Username
|
||||||
g.CredentialBlob = []byte(creds.Secret)
|
g.CredentialBlob = []byte(creds.Secret)
|
||||||
g.Persist = winc.PersistLocalMachine
|
g.Persist = winc.PersistLocalMachine
|
||||||
g.Attributes = []winc.CredentialAttribute{winc.CredentialAttribute{"label", []byte(creds.Label)}}
|
g.Attributes = []winc.CredentialAttribute{{"label", []byte(creds.Label)}}
|
||||||
|
|
||||||
return g.Write()
|
return g.Write()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import (
|
|||||||
|
|
||||||
func TestWinCredHelper(t *testing.T) {
|
func TestWinCredHelper(t *testing.T) {
|
||||||
creds := &credentials.Credentials{
|
creds := &credentials.Credentials{
|
||||||
Label: credentials.CredsLabel,
|
Label: credentials.CredsLabel,
|
||||||
ServerURL: "https://foobar.docker.io:2376/v1",
|
ServerURL: "https://foobar.docker.io:2376/v1",
|
||||||
Username: "foobar",
|
Username: "foobar",
|
||||||
Secret: "foobarbaz",
|
Secret: "foobarbaz",
|
||||||
}
|
}
|
||||||
creds1 := &credentials.Credentials{
|
creds1 := &credentials.Credentials{
|
||||||
Label: credentials.CredsLabel,
|
Label: credentials.CredsLabel,
|
||||||
ServerURL: "https://foobar.docker.io:2376/v2",
|
ServerURL: "https://foobar.docker.io:2376/v2",
|
||||||
Username: "foobarbaz",
|
Username: "foobarbaz",
|
||||||
Secret: "foobar",
|
Secret: "foobar",
|
||||||
|
|||||||
Reference in New Issue
Block a user