aboutsummaryrefslogtreecommitdiff
path: root/pkg/rtree/main.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2017-07-07 11:30:47 +0200
committerStefan Majewsky <majewsky@gmx.net>2017-07-07 11:33:00 +0200
commit79933615f7988cb731baa0768a45b39008f18b20 (patch)
treeab2199aa7940fdbdca7c6e6e0faaf47854342ef5 /pkg/rtree/main.go
parent58a4af83e0caf09744dd698b5be937205b81e733 (diff)
downloadgofu-79933615f7988cb731baa0768a45b39008f18b20.tar.gz
add first test
Diffstat (limited to 'pkg/rtree/main.go')
-rw-r--r--pkg/rtree/main.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/rtree/main.go b/pkg/rtree/main.go
index f08126e..762f457 100644
--- a/pkg/rtree/main.go
+++ b/pkg/rtree/main.go
@@ -24,8 +24,11 @@ import (
"github.com/majewsky/gofu/pkg/cli"
)
-//Exec executes the rtree applet and does not return. The argument is os.Args
-//minus the leading "rtree" or "gofu rtree".
+//Exec executes the rtree applet and returns an exit code (0 for success, >0
+//for error). The argument is os.Args minus the leading "rtree" or "gofu
+//rtree". All side-effects (reading from stdin, writing to stdout/stderr,
+//executing other programs) pass through cli.Interface and can be intercepted
+//there for the purpose of testing.
func Exec(args []string) int {
if !Init() {
return 1