Mostly TODOs, but adds command to build Darwin/ARM

This commit is contained in:
Sean E. Russell 2021-07-20 09:31:42 -05:00
parent 3507351262
commit bda9b394d0
5 changed files with 7 additions and 2 deletions

View File

@ -19,4 +19,4 @@ jobs:
env: env:
SRCPATH: ./cmd/gotop SRCPATH: ./cmd/gotop
with: with:
args: darwin/amd64 linux/amd64 linux/386 linux/arm64 linux/arm7 linux/arm6 linux/arm5 windows/amd64 windows/386 freebsd/amd64 freebsd/386 args: darwin/amd64 darwin/arm64 linux/amd64 linux/386 linux/arm64 linux/arm7 linux/arm6 linux/arm5 windows/amd64 windows/386 freebsd/amd64 freebsd/386

View File

@ -20,6 +20,7 @@ import (
"github.com/xxxserxxx/lingo/v2" "github.com/xxxserxxx/lingo/v2"
) )
// FIXME github action uses old(er) Go version that doesn't have embed
//go:embed "dicts/*.toml" //go:embed "dicts/*.toml"
var Dicts embed.FS var Dicts embed.FS
@ -50,6 +51,7 @@ type Config struct {
NvidiaRefresh time.Duration NvidiaRefresh time.Duration
} }
// FIXME parsing can't handle blank lines
func NewConfig() Config { func NewConfig() Config {
cd := configdir.New("", "gotop") cd := configdir.New("", "gotop")
cd.LocalPath, _ = filepath.Abs(".") cd.LocalPath, _ = filepath.Abs(".")

View File

@ -5,6 +5,7 @@ import "log"
var memFuncs []func(map[string]MemoryInfo) map[string]error var memFuncs []func(map[string]MemoryInfo) map[string]error
// TODO Colors are wrong for #mem > 2 // TODO Colors are wrong for #mem > 2
// TODO Swap memory values for remote devices is bogus
type MemoryInfo struct { type MemoryInfo struct {
Total uint64 Total uint64
Used uint64 Used uint64

View File

@ -23,8 +23,9 @@ var remoteLock sync.Mutex
// TODO network resiliency; I believe it currently crashes gotop when the network goes down // TODO network resiliency; I believe it currently crashes gotop when the network goes down
// TODO Replace custom decoder with https://github.com/prometheus/common/blob/master/expfmt/decode.go // TODO Replace custom decoder with https://github.com/prometheus/common/blob/master/expfmt/decode.go
// TODO MQTT / Stomp / MsgPack // TODO MQTT / Stomp / MsgPack
// FIXME high CPU use when remote goes offline
// FIXME higher CPU use when using remote in general
func init() { func init() {
// TODO add this to help text
opflag.StringVarP(&name, "remote-name", "", "", "Remote: name of remote gotop") opflag.StringVarP(&name, "remote-name", "", "", "Remote: name of remote gotop")
opflag.StringVarP(&remote_url, "remote-url", "", "", "Remote: URL of remote gotop") opflag.StringVarP(&remote_url, "remote-url", "", "", "Remote: URL of remote gotop")
opflag.DurationVarP(&sleep, "remote-refresh", "", 0, "Remote: Frequency to refresh data, in seconds") opflag.DurationVarP(&sleep, "remote-refresh", "", 0, "Remote: Frequency to refresh data, in seconds")

View File

@ -12,6 +12,7 @@ import (
ui "github.com/xxxserxxx/gotop/v4/termui" ui "github.com/xxxserxxx/gotop/v4/termui"
) )
// TODO Maybe group CPUs in columns if space permits
type CPUWidget struct { type CPUWidget struct {
*ui.LineGraph *ui.LineGraph
CPUCount int CPUCount int