mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
cleanup: fix golint warnings in util, e2e
util: golint warns about exported methods to have a comment or to unexport them. e2e: golint warns about package comment to be of the form "Package e2e ..." Reported-by: https://goreportcard.com/report/github.com/ceph/ceph-csi Updates: #975 Signed-off-by: Yug Gupta <ygupta@redhat.com>
This commit is contained in:
@ -34,7 +34,7 @@ type VolumeLocks struct {
|
||||
mux sync.Mutex
|
||||
}
|
||||
|
||||
// NewVolumeLocks returns new VolumeLocks
|
||||
// NewVolumeLocks returns new VolumeLocks.
|
||||
func NewVolumeLocks() *VolumeLocks {
|
||||
return &VolumeLocks{
|
||||
locks: sets.NewString(),
|
||||
@ -53,6 +53,7 @@ func (vl *VolumeLocks) TryAcquire(volumeID string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Release deletes the lock on volumeID.
|
||||
func (vl *VolumeLocks) Release(volumeID string) {
|
||||
vl.mux.Lock()
|
||||
defer vl.mux.Unlock()
|
||||
|
Reference in New Issue
Block a user