diff options
author | Sean E. Russell <ser@ser1.net> | 2020-04-27 20:33:41 -0500 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2020-04-27 20:33:41 -0500 |
commit | 285d4d02972e5d3e52efa6554fcbb08b42577f7c (patch) | |
tree | a06df20b360abdbc011b697e01e7ac9df5022117 /config.go | |
parent | 1e78e6faa096237440e9cbbe254951f6d8588624 (diff) |
Go vet/lint cleanups
Diffstat (limited to 'config.go')
-rw-r--r-- | config.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -48,7 +48,7 @@ func NewConfig() Config { PercpuLoad: true, TempScale: widgets.Celsius, Statusbar: false, - NetInterface: widgets.NET_INTERFACE_ALL, + NetInterface: widgets.NetInterfaceAll, MaxLogSize: 5000000, Layout: "default", ExtensionVars: make(map[string]string), @@ -169,16 +169,16 @@ func load(in io.Reader, conf *Config) error { return nil } -func (c *Config) Write() (string, error) { +func (conf *Config) Write() (string, error) { cfn := "gotop.conf" - ds := c.ConfigDir.QueryFolders(configdir.Global) + ds := conf.ConfigDir.QueryFolders(configdir.Global) if len(ds) == 0 { - ds = c.ConfigDir.QueryFolders(configdir.Local) + ds = conf.ConfigDir.QueryFolders(configdir.Local) if len(ds) == 0 { return "", fmt.Errorf("error locating config folders") } } - marshalled := marshal(c) + marshalled := marshal(conf) err := ds[0].WriteFile(cfn, marshalled) if err != nil { return "", err |