summaryrefslogtreecommitdiff
path: root/internal/config/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/config/config.go')
-rw-r--r--internal/config/config.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 1b4c9e1..9daf6d2 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -24,14 +24,14 @@ type Config struct {
MaxWidth int
NetAverage int
NetLink string
- ShowAvgLine bool
- ShowIOAvgLine bool
- ShowCores bool
- ShowMem bool
+ ShowAvgLine bool
+ ShowIOAvgLine bool
+ ShowCores bool
+ ShowMem bool
ShowNet bool
ShowSeparators bool
SSHOpts string
- Cluster string
+ Cluster string
}
// Default returns a Config with default values.
@@ -182,11 +182,6 @@ func (c *Config) set(key, val string) {
}
}
-func parseBool(s string) bool {
- s = strings.TrimSpace(strings.ToLower(s))
- return s == "1" || s == "true" || s == "yes"
-}
-
func (c *Config) writeTo(f *os.File) error {
w := bufio.NewWriter(f)
writeInt := func(key string, v int) { fmt.Fprintf(w, "%s=%d\n", key, v) }
@@ -217,6 +212,11 @@ func (c *Config) writeTo(f *os.File) error {
return w.Flush()
}
+func parseBool(s string) bool {
+ s = strings.TrimSpace(strings.ToLower(s))
+ return s == "1" || s == "true" || s == "yes"
+}
+
func getClusterHostsRec(cluster, path string, depth int, seen map[string]bool) ([]string, error) {
if depth > constants.CSSHMaxRecursion {
return nil, fmt.Errorf("cluster recursion limit reached in %s (possible cycle)", path)