summaryrefslogtreecommitdiffstats
path: root/config.go
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-04-23 13:38:22 -0500
committerSean E. Russell <ser@ser1.net>2020-04-23 13:38:22 -0500
commit61e080e51854fbaca0836e2be6eaf623153cdb0f (patch)
treec37140f266ed0101d2819b20055a24805303e713 /config.go
parent32861bcca88ca9fb678244b2d1ba65d09d946acc (diff)
Remove deprecated command-line argumentsv3.6
Diffstat (limited to 'config.go')
-rw-r--r--config.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/config.go b/config.go
index 0979806..19f7589 100644
--- a/config.go
+++ b/config.go
@@ -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]