kappanhang/args.go

24 lines
327 B
Go
Raw Normal View History

2020-10-16 17:13:46 +02:00
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
}