feat(go): implement unlink
This commit is contained in:
@@ -81,7 +81,14 @@ func Run(args []string, stdout io.Writer, stderr io.Writer) int {
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
case "unlink", "track", "pull", "push", "commit", "destroy", "cd", "open", "exec", "exec_all", "rc", "generate":
|
||||
case "unlink":
|
||||
castle := defaultCastle(args)
|
||||
if err := app.Unlink(castle); err != nil {
|
||||
_, _ = fmt.Fprintf(stderr, "error: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
case "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:
|
||||
@@ -108,10 +115,11 @@ func printHelp(w io.Writer) {
|
||||
_, _ = fmt.Fprintln(w, " status [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " diff [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " link [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " unlink [CASTLE]")
|
||||
_, _ = fmt.Fprintln(w, " version | -v | --version")
|
||||
_, _ = fmt.Fprintln(w, "")
|
||||
_, _ = fmt.Fprintln(w, "Not implemented yet:")
|
||||
_, _ = fmt.Fprintln(w, " unlink, track, pull, push, commit, destroy, cd, open, exec, exec_all, rc, generate")
|
||||
_, _ = fmt.Fprintln(w, " 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