mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-08 22:24:54 +00:00
chore: fix Errorf arguments
This commit is contained in:
1 parent
f8ebd94a79
commit
8709ac0ed5
1 file changed
+1
-1
@@ -300,7 +300,7 @@ func parseVolumeFlagValue(volume string) (api.VolumeSpec, api.VolumeMount, error
|
|||||||
parts := strings.Split(volume, ":")
|
parts := strings.Split(volume, ":")
|
||||||
switch len(parts) {
|
switch len(parts) {
|
||||||
case 1:
|
case 1:
|
||||||
return spec, mount, fmt.Errorf("invalid format, must contain at least one separator ':'", volume)
|
return spec, mount, fmt.Errorf("invalid format, must contain at least one separator ':'")
|
||||||
case 2, 3:
|
case 2, 3:
|
||||||
// Format: (volume_name|/host/path):/container/path[:opts]
|
// Format: (volume_name|/host/path):/container/path[:opts]
|
||||||
if !strings.HasPrefix(parts[1], "/") {
|
if !strings.HasPrefix(parts[1], "/") {
|
||||||
|
|||||||
Reference in new issue
Block a user