github.com/toplink-cn/moby@v0.0.0-20240305205811-460b4aebdf81/integration-cli/docker_api_containers_unix_test.go (about) 1 //go:build !windows 2 3 package main 4 5 import ( 6 "testing" 7 8 "github.com/moby/sys/mount" 9 ) 10 11 func mountWrapper(t *testing.T, device, target, mType, options string) error { 12 t.Helper() 13 err := mount.Mount(device, target, mType, options) 14 if err != nil { 15 return err 16 } 17 t.Cleanup(func() { _ = mount.Unmount(target) }) 18 return nil 19 }