add:send func

This commit is contained in:
2026-04-06 02:57:22 +09:00
parent 2760826b26
commit 5e44a3a35c
8 changed files with 342 additions and 11 deletions

11
main.go
View File

@@ -15,8 +15,13 @@ func main() {
if _, err := exec.LookPath("rsync"); err != nil {
fmt.Fprintln(os.Stderr, "error: rsync is required but was not found in PATH")
fmt.Fprintln(os.Stderr, "install it with your package manager, e.g.:")
fmt.Fprintln(os.Stderr, " brew install rsync")
fmt.Fprintln(os.Stderr, " apt install rsync")
fmt.Fprintln(os.Stderr, " sudo pacman -S rsync")
os.Exit(1)
}
localDir, err := os.Getwd()
if err != nil {
fmt.Fprintln(os.Stderr, "failed to get working directory:", err)
os.Exit(1)
}
@@ -26,7 +31,7 @@ func main() {
os.Exit(1)
}
m := tui.NewTUIInterface(store)
m := tui.NewTUIInterface(store, localDir)
p := tea.NewProgram(m)
if _, err := p.Run(); err != nil {
fmt.Fprintln(os.Stderr, err)