github.com/Prakhar-Agarwal-byte/moby@v0.0.0-20231027092010-a14e3e8ab87e/volume/mounts/validate.go (about) 1 package mounts // import "github.com/Prakhar-Agarwal-byte/moby/volume/mounts" 2 3 import ( 4 "fmt" 5 6 "github.com/Prakhar-Agarwal-byte/moby/api/types/mount" 7 "github.com/pkg/errors" 8 ) 9 10 type errMountConfig struct { 11 mount *mount.Mount 12 err error 13 } 14 15 func (e *errMountConfig) Error() string { 16 return fmt.Sprintf("invalid mount config for type %q: %v", e.mount.Type, e.err.Error()) 17 } 18 19 func errBindSourceDoesNotExist(path string) error { 20 return errors.Errorf("bind source path does not exist: %s", path) 21 } 22 23 func errExtraField(name string) error { 24 return errors.Errorf("field %s must not be specified", name) 25 } 26 27 func errMissingField(name string) error { 28 return errors.Errorf("field %s must not be empty", name) 29 }