diff --git a/gfalse/false.go b/gfalse/false.go new file mode 100644 index 0000000..043fe8a --- /dev/null +++ b/gfalse/false.go @@ -0,0 +1,5 @@ +package gfalse + +func Run(args []string) int { + return 1 +} \ No newline at end of file diff --git a/gtrue/true.go b/gtrue/true.go new file mode 100644 index 0000000..56a5308 --- /dev/null +++ b/gtrue/true.go @@ -0,0 +1,5 @@ +package gtrue + +func Run(args []string) int { + return 0 +} \ No newline at end of file diff --git a/main.go b/main.go index fab233d..c380f3e 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,8 @@ import( "github.com/jienfak/goblin/cat" "github.com/jienfak/goblin/echo" "github.com/jienfak/goblin/mkdir" + "github.com/jienfak/goblin/gtrue" + "github.com/jienfak/goblin/gfalse" ) func main() { @@ -20,6 +22,8 @@ func main() { "cat": cat.Run, "mkdir" : mkdir.Run, "echo" : echo.Run, + "true" : gtrue.Run, + "false" : gfalse.Run, } if binBase := path.Base(os.Args[0]) ; binBase != "goblin" { @@ -42,4 +46,4 @@ func main() { } status := utilsMap[utilName].(func([]string) int )(args) os.Exit(status) -} \ No newline at end of file +}