util to check if volume exists

pull/124/head
cupcakearmy 3 years ago
parent 2c46f0da0c
commit 6817f494ef
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

@ -77,3 +77,9 @@ func CopyFile(from, to string) error {
} }
return nil return nil
} }
func CheckIfVolumeExists(volume string) bool {
out, err := ExecuteCommand(ExecuteOptions{Command: "docker"}, "volume", "inspect", volume)
fmt.Println(out)
return err == nil
}

Loading…
Cancel
Save