mirror of
https://github.com/docker/docker-credential-helpers.git
synced 2026-06-13 16:01:28 +05:30
fix some linting issues
/go/src/github.com/docker/docker-credential-helper/pass/pass.go:1:1: package comment should be of the form "Package pass ..."
/go/src/github.com/docker/docker-credential-helper/pass/pass.go:22:7: don't use ALL_CAPS in Go names; use CamelCase
/go/src/github.com/docker/docker-credential-helper/pass/pass.go:22:7: exported const PASS_FOLDER should have comment or be unexported
/go/src/github.com/docker/docker-credential-helper/pass/pass.go:82:1: receiver name h should be consistent with previous receiver name p for Pass
/go/src/github.com/docker/docker-credential-helper/pass/pass.go:94:1: receiver name h should be consistent with previous receiver name p for Pass
/go/src/github.com/docker/docker-credential-helper/pass/pass.go:131:1: receiver name h should be consistent with previous receiver name p for Pass
/go/src/github.com/docker/docker-credential-helper/pass/pass.go:161:1: receiver name h should be consistent with previous receiver name p for Pass
/go/src/github.com/docker/docker-credential-helper/registryurl/url_go18.go:9:1: exported function GetHostname should have comment or be unexported
/go/src/github.com/docker/docker-credential-helper/registryurl/url_go18.go:13:1: exported function GetPort should have comment or be unexported
/go/src/github.com/docker/docker-credential-helper/secretservice/secretservice_linux_test.go:22:2: don't use underscores in Go names; var old_auths should be oldAuths
/go/src/github.com/docker/docker-credential-helper/secretservice/secretservice_linux_test.go:64:2: don't use underscores in Go names; var new_auths should be newAuths
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -19,14 +19,14 @@ func TestSecretServiceHelper(t *testing.T) {
|
||||
helper := Secretservice{}
|
||||
|
||||
// Check how many docker credentials we have when starting the test
|
||||
old_auths, err := helper.List()
|
||||
oldAuths, err := helper.List()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// If any docker credentials with the tests values we are providing, we
|
||||
// remove them as they probably come from a previous failed test
|
||||
for k, v := range old_auths {
|
||||
for k, v := range oldAuths {
|
||||
if strings.Compare(k, creds.ServerURL) == 0 && strings.Compare(v, creds.Username) == 0 {
|
||||
|
||||
if err := helper.Delete(creds.ServerURL); err != nil {
|
||||
@@ -36,7 +36,7 @@ func TestSecretServiceHelper(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check again how many docker credentials we have when starting the test
|
||||
old_auths, err = helper.List()
|
||||
oldAuths, err = helper.List()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -61,11 +61,11 @@ func TestSecretServiceHelper(t *testing.T) {
|
||||
}
|
||||
|
||||
// We should have one more credential than before adding
|
||||
new_auths, err := helper.List()
|
||||
if err != nil || (len(new_auths)-len(old_auths) != 1) {
|
||||
newAuths, err := helper.List()
|
||||
if err != nil || (len(newAuths)-len(oldAuths) != 1) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
old_auths = new_auths
|
||||
oldAuths = newAuths
|
||||
|
||||
// Deleting the credentials associated to current server url should succeed
|
||||
if err := helper.Delete(creds.ServerURL); err != nil {
|
||||
@@ -73,8 +73,8 @@ func TestSecretServiceHelper(t *testing.T) {
|
||||
}
|
||||
|
||||
// We should have one less credential than before deleting
|
||||
new_auths, err = helper.List()
|
||||
if err != nil || (len(old_auths)-len(new_auths) != 1) {
|
||||
newAuths, err = helper.List()
|
||||
if err != nil || (len(oldAuths)-len(newAuths) != 1) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user