add lograw option
This commit is contained in:
+4
-3
@@ -24,10 +24,11 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
cfgFile string
|
||||
device string
|
||||
cfgFile string
|
||||
device string
|
||||
baudrate int
|
||||
bytesize byte
|
||||
lograw bool
|
||||
|
||||
dbFile string
|
||||
dbInit bool
|
||||
@@ -86,13 +87,13 @@ func initConfig() {
|
||||
|
||||
viper.AutomaticEnv() // read in environment variables that match
|
||||
|
||||
|
||||
// If a config file is found, read it in.
|
||||
if err := viper.ReadInConfig(); err == nil {
|
||||
fmt.Println("Using config file:", viper.ConfigFileUsed())
|
||||
device = viper.GetString("serial.device")
|
||||
baudrate = viper.GetInt("serial.baudrate")
|
||||
bytesize = byte(viper.GetInt("serial.bytesize"))
|
||||
lograw = viper.GetBool("serial.lograw")
|
||||
dbFile = viper.GetString("sqlite.file")
|
||||
dbInit = viper.GetBool("sqlite.init")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user