Skip to content

Commit 239e785

Browse files
mutex is already a pointer use it idiomatically
1 parent f616546 commit 239e785

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/volume/factory.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ import (
2525
"github.com/golang/glog"
2626
)
2727

28-
var vf = &vFactory{}
29-
var provisionerLock = &sync.Mutex{}
28+
var (
29+
vf = &vFactory{}
30+
provisionerLock sync.Mutex
31+
)
3032

3133
type vFactory struct {
3234
Paths []string
@@ -43,7 +45,7 @@ func Provision(volumeID string) (string, error) {
4345
defer provisionerLock.Unlock()
4446

4547
if len(vf.Paths) == 0 {
46-
return "", fmt.Errorf("no base paths provided for directs")
48+
return "", fmt.Errorf("no base paths provided for direct CSI")
4749
}
4850
next := vf.LastAssigned + 1
4951
next = next % len(vf.Paths)

0 commit comments

Comments
 (0)