summaryrefslogtreecommitdiff
path: root/volume
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-07-08 18:27:07 +0200
committerSebastiaan van Stijn <github@gone.nl>2022-07-08 19:56:23 +0200
commit52c1a2fae8ffe3efc8b24ef53a702582131ebc57 (patch)
tree32566addcaabbe5a2d50e8039da88d8223d6ada9 /volume
parent6668801d4056cf2e59eff2b23620b9d8a4043734 (diff)
downloaddocker-52c1a2fae8ffe3efc8b24ef53a702582131ebc57.tar.gz
gofmt GoDoc comments with go1.19
Older versions of Go don't format comments, so committing this as a separate commit, so that we can already make these changes before we upgrade to Go 1.19. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'volume')
-rw-r--r--volume/drivers/extpoint.go4
-rw-r--r--volume/mounts/lcow_parser.go6
-rw-r--r--volume/service/store.go8
3 files changed, 9 insertions, 9 deletions
diff --git a/volume/drivers/extpoint.go b/volume/drivers/extpoint.go
index 3878736cbb..970c909f72 100644
--- a/volume/drivers/extpoint.go
+++ b/volume/drivers/extpoint.go
@@ -21,13 +21,13 @@ const extName = "VolumeDriver"
// volumeDriver defines the available functions that volume plugins must implement.
// This interface is only defined to generate the proxy objects.
// It's not intended to be public or reused.
-//nolint: deadcode
+// nolint: deadcode,unused,varcheck
type volumeDriver interface {
// Create a volume with the given name
Create(name string, opts map[string]string) (err error)
// Remove the volume with the given name
Remove(name string) (err error)
- // Get the mountpoint of the given volume
+ // Path returns the mountpoint of the given volume.
Path(name string) (mountpoint string, err error)
// Mount the given volume and return the mountpoint
Mount(name, id string) (mountpoint string, err error)
diff --git a/volume/mounts/lcow_parser.go b/volume/mounts/lcow_parser.go
index 2dbd2d164b..3158f39024 100644
--- a/volume/mounts/lcow_parser.go
+++ b/volume/mounts/lcow_parser.go
@@ -22,9 +22,9 @@ func NewLCOWParser() Parser {
// rxLCOWDestination is the regex expression for the mount destination for LCOW
//
// Destination (aka container path):
-// - Variation on hostdir but can be a drive followed by colon as well
-// - If a path, must be absolute. Can include spaces
-// - Drive cannot be c: (explicitly checked in code, not RegEx)
+// - Variation on hostdir but can be a drive followed by colon as well
+// - If a path, must be absolute. Can include spaces
+// - Drive cannot be c: (explicitly checked in code, not RegEx)
const rxLCOWDestination = `(?P<destination>/(?:[^\\/:*?"<>\r\n]+[/]?)*)`
var (
diff --git a/volume/service/store.go b/volume/service/store.go
index dd3805524b..8926866e1c 100644
--- a/volume/service/store.go
+++ b/volume/service/store.go
@@ -571,7 +571,7 @@ func volumeExists(ctx context.Context, store *drivers.Store, v volume.Volume) (b
// create asks the given driver to create a volume with the name/opts.
// If a volume with the name is already known, it will ask the stored driver for the volume.
// If the passed in driver name does not match the driver name which is stored
-// for the given volume name, an error is returned after checking if the reference is stale.
+// for the given volume name, an error is returned after checking if the reference is stale.
// If the reference is stale, it will be purged and this create can continue.
// It is expected that callers of this function hold any necessary locks.
func (s *VolumeStore) create(ctx context.Context, name, driverName string, opts, labels map[string]string) (volume.Volume, bool, error) {
@@ -749,9 +749,9 @@ func (s *VolumeStore) getVolume(ctx context.Context, name, driverName string) (v
// lookupVolume gets the specified volume from the specified driver.
// This will only return errors related to communications with the driver.
-// If the driver returns an error that is not communication related the
-// error is logged but not returned.
-// If the volume is not found it will return `nil, nil``
+// If the driver returns an error that is not communication related, the error
+// is logged but not returned.
+// If the volume is not found it will return `nil, nil`
// TODO(@cpuguy83): plumb through the context to lower level components
func lookupVolume(ctx context.Context, store *drivers.Store, driverName, volumeName string) (volume.Volume, error) {
if driverName == "" {