mirror of
https://github.com/nonoo/kappanhang.git
synced 2025-12-06 08:02:00 +01:00
24 lines
327 B
Go
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
|
||
|
|
}
|