diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-13 22:59:39 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-13 22:59:39 +0200 |
| commit | ea22afd3e7336492433412d1ac771f4a1145b05f (patch) | |
| tree | aba2cd0730c2a79ae1081d512b76ad023295aa3a /cmd | |
| parent | cd5a3614baab756a41d764b79308afeea93f12dd (diff) | |
Go rewrite: loadbars with mage, default localhost, NOTICE
- Module codeberg.org/snonux/loadbars, Go 1.25
- cmd/loadbars, internal/{app,config,collector,display,stats,constants,version}
- SDL display, shell script for remote (no Perl), config/cluster support
- Magefile: build, test, install, uninstall/deinstall
- NOTICE for go-sdl2 attribution (BSD-3-Clause)
- Default to localhost when no hosts given (no SSH)
- Remove loadbars-go binary name; build as loadbars
Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/loadbars/main.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cmd/loadbars/main.go b/cmd/loadbars/main.go index f4e8985..fc053be 100644 --- a/cmd/loadbars/main.go +++ b/cmd/loadbars/main.go @@ -6,10 +6,10 @@ import ( "os" "strings" - "github.com/loadbars/loadbars/internal/app" - "github.com/loadbars/loadbars/internal/config" - "github.com/loadbars/loadbars/internal/constants" - "github.com/loadbars/loadbars/internal/version" + "codeberg.org/snonux/loadbars/internal/app" + "codeberg.org/snonux/loadbars/internal/config" + "codeberg.org/snonux/loadbars/internal/constants" + "codeberg.org/snonux/loadbars/internal/version" ) func main() { @@ -84,10 +84,9 @@ func main() { os.Exit(constants.Success) } + // No hosts given: run locally without SSH if len(cfg.Hosts) == 0 { - fmt.Fprintf(os.Stderr, "loadbars: no hosts specified (use --hosts or --cluster)\n") - printUsage() - os.Exit(constants.ENoHost) + cfg.Hosts = []string{"localhost"} } if err := app.Run(&cfg); err != nil { |
