feat(go): implement link with subdir and force handling
This commit is contained in:
@@ -74,7 +74,14 @@ func Run(args []string, stdout io.Writer, stderr io.Writer) int {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
case "link", "unlink", "track", "pull", "push", "commit", "destroy", "cd", "open", "exec", "exec_all", "rc", "generate":
|
||||
case "link":
|
||||
castle := defaultCastle(args)
|
||||
if err := app.LinkCastle(castle); err != nil {
|
||||
_, _ = fmt.Fprintf(stderr, "error: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
case "unlink", "track", "pull", "push", "commit", "destroy", "cd", "open", "exec", "exec_all", "rc", "generate":
|
||||
_, _ = fmt.Fprintf(stderr, "error: %s is not implemented in Go yet\n", command)
|
||||
return 2
|
||||
default:
|
||||
@@ -100,10 +107,11 @@ func printHelp(w io.Writer) {
|
||||
_, _ = fmt.Fprintln(w, " show_path [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " status [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " diff [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " link [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " version | -v | --version")
|
||||
_, _ = fmt.Fprintln(w, "")
|
||||
_, _ = fmt.Fprintln(w, "Not implemented yet:")
|
||||
_, _ = fmt.Fprintln(w, " link, unlink, track, pull, push, commit, destroy, cd, open, exec, exec_all, rc, generate")
|
||||
_, _ = fmt.Fprintln(w, " unlink, track, pull, push, commit, destroy, cd, open, exec, exec_all, rc, generate")
|
||||
_, _ = fmt.Fprintln(w, "")
|
||||
_, _ = fmt.Fprintln(w, "Build: go build -o dist/homesick-go ./cmd/homesick")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user