1
0
mirror of https://github.com/docker/docker-credential-helpers.git synced 2026-06-14 08:21:28 +05:30

Merge pull request #273 from thaJeztah/gofumpt

format code with gofumpt
This commit is contained in:
Sebastiaan van Stijn
2023-05-27 13:44:47 +02:00
committed by GitHub
6 changed files with 15 additions and 13 deletions
+1
View File
@@ -8,6 +8,7 @@ package osxkeychain
#include <stdlib.h>
*/
import "C"
import (
"errors"
"strconv"
+4 -3
View File
@@ -28,11 +28,12 @@ type Pass struct{}
// Ideally these would be stored as members of Pass, but since all of Pass's
// methods have value receivers, not pointer receivers, and changing that is
// backwards incompatible, we assume that all Pass instances share the same configuration
var (
// initializationMutex is held while initializing so that only one 'pass'
// round-tripping is done to check pass is functioning.
var initializationMutex sync.Mutex
var passInitialized bool
initializationMutex sync.Mutex
passInitialized bool
)
// CheckInitialized checks whether the password helper can be used. It
// internally caches and so may be safely called multiple times with no impact
+1
View File
@@ -7,6 +7,7 @@ package secretservice
#include <stdlib.h>
*/
import "C"
import (
"errors"
"unsafe"
@@ -28,7 +28,6 @@ func TestSecretServiceHelper(t *testing.T) {
// remove them as they probably come from a previous failed test
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 {
t.Fatal(err)
}