sshfs mount helper
Adrian Cybulski adrian@cybulski.cc
Thu, 03 Oct 2024 16:46:39 +0100
2 files changed,
19 insertions(+),
0 deletions(-)
A
ssh/mount.go
@@ -0,0 +1,16 @@
+package ssh + +import "os/exec" + +// Mount SSHFS filesystem +// requires sshfs binary +func Mount(opts ...string) error { + execPath, err := exec.LookPath("sshfs") + if err != nil { + return err + } + + cmd := exec.Command(execPath, opts...) + + return cmd.Run() +}