master
1// this package implements a server-based question and answer system
2package main
3
4import (
5 "fmt"
6 "os"
7)
8
9// main handles starting the application
10// the default behavior prints a usage statement
11func main() {
12 if len(os.Args) < 1 {
13 ExecuteClient()
14 }
15 switch os.Args[len(os.Args)-1] {
16 case "server":
17 ExecuteServer()
18 case "client":
19 ExecuteClient()
20 default:
21 fmt.Printf("Usage: %s [options] [client | server]\n", os.Args[0])
22 ExecuteClient()
23 }
24}