diff options
author | Sean E. Russell <ser@ser1.net> | 2020-04-23 13:38:22 -0500 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2020-04-23 13:38:22 -0500 |
commit | 61e080e51854fbaca0836e2be6eaf623153cdb0f (patch) | |
tree | c37140f266ed0101d2819b20055a24805303e713 /config.go | |
parent | 32861bcca88ca9fb678244b2d1ba65d09d946acc (diff) |
Remove deprecated command-line argumentsv3.6
Diffstat (limited to 'config.go')
-rw-r--r-- | config.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4,6 +4,7 @@ import ( "bufio" "bytes" "fmt" + "io" "log" "path/filepath" "strconv" @@ -49,7 +50,11 @@ func (conf *Config) Load() error { } else { return nil } - r := bufio.NewScanner(bytes.NewReader(in)) + return load(bytes.NewReader(in), conf) +} + +func load(in io.Reader, conf *Config) error { + r := bufio.NewScanner(in) var lineNo int for r.Scan() { l := strings.TrimSpace(r.Text()) @@ -123,6 +128,7 @@ func (conf *Config) Load() error { } conf.Statusbar = bv case netinterface: + // FIXME this should be a comma-separated list conf.NetInterface = kv[1] case layout: conf.Layout = kv[1] |