Skip to content

Instantly share code, notes, and snippets.

@christophberger
Created April 4, 2017 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christophberger/efca9fba95fa1c3bdafcac7d9b2177a7 to your computer and use it in GitHub Desktop.
Save christophberger/efca9fba95fa1c3bdafcac7d9b2177a7 to your computer and use it in GitHub Desktop.
Code snippet from github.com/appliedgo/tui: main
func main() {
if len(os.Args) <= 1 {
log.Println("Usage: go run tui.go [termui|gocui]")
return
}
if os.Args[1] == "termui" {
runTermui()
return
}
if os.Args[1] == "gocui" {
runGocui()
return
}
log.Println("No such option:", os.Args[0])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment