gosl/cmd/cmd.go

29 lines
483 B
Go
Raw Normal View History

2016-01-18 23:19:51 +01:00
package cmd // code.bitsetter.de/fun/gosl/cmd
import (
"os"
"github.com/spf13/cobra"
)
const SERVERPORT int = 8989
type handshake struct{ ID, W, H int }
2016-01-18 23:19:51 +01:00
var cmdGosl = &cobra.Command{
Use: "gosl [command]",
Short: "Run a gosl instance",
2016-01-19 16:38:15 +01:00
Long: `Run a gosl server or client.
2016-01-18 23:19:51 +01:00
For further instructions run 'gosl help [command]'
`,
}
func Execute() {
cmdGosl.AddCommand(cmdServer)
cmdGosl.AddCommand(cmdClient)
if err := cmdGosl.Execute(); err != nil {
os.Exit(-1)
}
}