diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -29,30 +29,29 @@ import ( ) func main() { - ci := cli.NewInterface(os.Stdin, os.Stdout, os.Stderr) if len(earlyerrors.Get()) > 0 { for _, msg := range earlyerrors.Get() { - ci.ShowError(msg) + cli.Interface.ShowError(msg) } os.Exit(255) } - os.Exit(execApplet(ci, filepath.Base(os.Args[0]), os.Args[1:], true)) + os.Exit(execApplet(filepath.Base(os.Args[0]), os.Args[1:], true)) } -func execApplet(ci *cli.Interface, applet string, args []string, allowGofu bool) int { +func execApplet(applet string, args []string, allowGofu bool) int { //allow explicit specification of applet as "./build/gofu <applet> <args>" if allowGofu && applet == "gofu" { if len(args) == 0 { fmt.Fprintln(os.Stderr, "Usage: gofu <applet> [args...]") return 1 } - return execApplet(ci, args[0], args[1:], false) + return execApplet(args[0], args[1:], false) } switch applet { case "rtree": - return rtree.Exec(ci, args) + return rtree.Exec(args) default: fmt.Fprintln(os.Stderr, "ERROR: unknown applet: "+applet) return 255 |
