Move log into the main package

This commit is contained in:
Nonoo 2020-10-26 09:09:30 +01:00
parent 1372598279
commit d2efa14e9c
13 changed files with 89 additions and 95 deletions

View file

@ -7,12 +7,14 @@ import (
"github.com/pborman/getopt"
)
var verboseLog bool
var connectAddress string
var serialTCPPort uint16
var enableSerialDevice bool
func parseArgs() {
h := getopt.BoolLong("help", 'h', "display help")
v := getopt.BoolLong("verbose", 'v', "Enable verbose (debug) logging")
a := getopt.StringLong("address", 'a', "IC-705", "Connect to address")
t := getopt.Uint16Long("serial-tcp-port", 'p', 4533, "Expose radio's serial port on this TCP port")
s := getopt.BoolLong("enable-serial-device", 's', "Expose radio's serial port as a virtual serial port")
@ -25,6 +27,7 @@ func parseArgs() {
os.Exit(1)
}
verboseLog = *v
connectAddress = *a
serialTCPPort = *t
enableSerialDevice = *s