kappanhang/args.go
2020-10-17 19:09:53 +02:00

24 lines
327 B
Go

package main
import (
"os"
"github.com/pborman/getopt"
)
var connectAddress string
func parseArgs() {
h := getopt.BoolLong("help", 'h', "display help")
a := getopt.StringLong("address", 'a', "IC-705", "Connect to address")
getopt.Parse()
if *h || *a == "" {
getopt.Usage()
os.Exit(1)
}
connectAddress = *a
}