* Another actions test
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Add BuildTest action
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Remove lint check for the time being (so many issues)
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix issues found by errcheck
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix errors found by staticcheck
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix issues found by goimports
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Comment out the action for the time being
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix shadowed variables
Signed-off-by: Chris Cummer <chriscummer@me.com>
* go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Remove buildtest.yml
Signed-off-by: Chris Cummer <chriscummer@me.com>
* go mod tidy
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Add gosec to the Makefile
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Fix some issues found by gosec
Signed-off-by: Chris Cummer <chriscummer@me.com>
* Prevent flickering in cmdRunner widgets
This commit removes flickering in the cmdRunner widgets while preserving
the live-update functionality. It amends 45b955 by not redrawing on
every write call. Instead, the logic in Refresh is as follows:
1. If the command is already running, it will not try to re-run the
command. The default case in the select will trigger a re-draw instead
so that new output can be seen. This accommodates long-runing commands
eg. tailing a log.
2. If the command is not already running, it will trigger a new run.
When the command terminates, it will trigger a re-draw. This means the
widget refreshes as soon as possible, to accommodate the original use
case of running a command and displaying its output in the widget.
In all cases, the widget will not re-draw more often than the refresh
interval. This is what eliminates flickering, since the previous
implementation before using goroutines was not redrawing more than once
per refresh interval.
* Remove useless locking in Refresh
Since the Refresh command doesn't actually block on anything, and the
goroutines have their own locking, Refresh shouldn't lock.
Have all instances take a function
Update the remaining modules to take this into account
Numerous smaller refactors to make some widgets work more or less the same