diff options
author | Max Magorsch <arzano@gentoo.org> | 2020-03-18 03:55:30 +0100 |
---|---|---|
committer | Max Magorsch <arzano@gentoo.org> | 2020-03-18 03:55:30 +0100 |
commit | ef2794e3cac14bf3e716f89a178ee15138e1aa62 (patch) | |
tree | 9ba24bb8a704d1053366cac27b24eb0829e292b5 /soko.go | |
download | soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.tar.gz soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.tar.bz2 soko-ef2794e3cac14bf3e716f89a178ee15138e1aa62.zip |
Initial commit containing v0.1.0 of Soko
This is a rewrite of packages.g.o based on postgres and git
written in Go.
Signed-off-by: Max Magorsch <arzano@gentoo.org>
Diffstat (limited to 'soko.go')
-rw-r--r-- | soko.go | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +package main + +import ( + "fmt" + "os" + "soko/pkg/app" + "soko/pkg/portage" + "time" +) + +func printHelp(){ + fmt.Println("Please specific one of the following options:") + fmt.Println(" soko update -- update the database") + fmt.Println(" soko serve -- serve the application") +} + +func isCommand(command string) bool{ + return len(os.Args) > 1 && os.Args[1] == command +} + +func main() { + + time.Sleep(5 * time.Second) + + if(isCommand("serve")) { + app.Serve() + }else if(isCommand("update")){ + portage.Update() + }else{ + printHelp() + } + +} |