Skip to content

Commit 4ede49c

Browse files
authored
Merge pull request #273 from thaJeztah/gofumpt
format code with gofumpt
2 parents a001d63 + 9817a23 commit 4ede49c

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

credentials/credentials_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (m *memoryStore) Get(serverURL string) (string, string, error) {
3737
}
3838

3939
func (m *memoryStore) List() (map[string]string, error) {
40-
//Simply a placeholder to let memoryStore be a valid implementation of Helper interface
40+
// Simply a placeholder to let memoryStore be a valid implementation of Helper interface
4141
return nil, nil
4242
}
4343

@@ -235,14 +235,14 @@ func TestEraseMissingServerURL(t *testing.T) {
235235
}
236236

237237
func TestList(t *testing.T) {
238-
//This tests that there is proper input an output into the byte stream
239-
//Individual stores are very OS specific and have been tested in osxkeychain and secretservice respectively
238+
// This tests that there is proper input an output into the byte stream
239+
// Individual stores are very OS specific and have been tested in osxkeychain and secretservice respectively
240240
out := new(bytes.Buffer)
241241
h := newMemoryStore()
242242
if err := List(h, out); err != nil {
243243
t.Fatal(err)
244244
}
245-
//testing that there is an output
245+
// testing that there is an output
246246
if out.Len() == 0 {
247247
t.Fatalf("expected output in the writer, got %d", 0)
248248
}

osxkeychain/osxkeychain_darwin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package osxkeychain
88
#include <stdlib.h>
99
*/
1010
import "C"
11+
1112
import (
1213
"errors"
1314
"strconv"

pass/pass.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ type Pass struct{}
2828
// Ideally these would be stored as members of Pass, but since all of Pass's
2929
// methods have value receivers, not pointer receivers, and changing that is
3030
// backwards incompatible, we assume that all Pass instances share the same configuration
31-
32-
// initializationMutex is held while initializing so that only one 'pass'
33-
// round-tripping is done to check pass is functioning.
34-
var initializationMutex sync.Mutex
35-
var passInitialized bool
31+
var (
32+
// initializationMutex is held while initializing so that only one 'pass'
33+
// round-tripping is done to check pass is functioning.
34+
initializationMutex sync.Mutex
35+
passInitialized bool
36+
)
3637

3738
// CheckInitialized checks whether the password helper can be used. It
3839
// internally caches and so may be safely called multiple times with no impact

secretservice/secretservice_linux.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package secretservice
77
#include <stdlib.h>
88
*/
99
import "C"
10+
1011
import (
1112
"errors"
1213
"unsafe"

secretservice/secretservice_linux_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ func TestSecretServiceHelper(t *testing.T) {
2828
// remove them as they probably come from a previous failed test
2929
for k, v := range oldAuths {
3030
if strings.Compare(k, creds.ServerURL) == 0 && strings.Compare(v, creds.Username) == 0 {
31-
3231
if err := helper.Delete(creds.ServerURL); err != nil {
3332
t.Fatal(err)
3433
}

wincred/wincred_windows.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ func exactMatch(serverURL, target url.URL) bool {
111111
}
112112

113113
func approximateMatch(serverURL, target url.URL) bool {
114-
//if scheme is missing assume it is the same as target
114+
// if scheme is missing assume it is the same as target
115115
if serverURL.Scheme == "" {
116116
serverURL.Scheme = target.Scheme
117117
}
118-
//if port is missing assume it is the same as target
118+
// if port is missing assume it is the same as target
119119
if serverURL.Port() == "" && target.Port() != "" {
120120
serverURL.Host = serverURL.Host + ":" + target.Port()
121121
}
122-
//if path is missing assume it is the same as target
122+
// if path is missing assume it is the same as target
123123
if serverURL.Path == "" {
124124
serverURL.Path = target.Path
125125
}

0 commit comments

Comments
 (0)