From ed04ccd8e2297458ec97381806a05dea13090f0f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 7 May 2026 09:47:05 +0300 Subject: update docs and ascii banner --- internal/flags/flags.go | 4 ++++ internal/flags/version.go | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'internal/flags') diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 9b1c3cf..5d00b74 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -42,6 +42,9 @@ type Config struct { CollapsedFields []string CountField string GlobalFilter globalfilter.Filter + + // ShowVersion prints the banner plus version and exits without running. + ShowVersion bool } var ( @@ -177,6 +180,7 @@ func parse() error { flag.BoolVar(&cfg.TestLiveFlames, "testliveflames", false, "Run TUI with continuously-updating synthetic flamegraph data for live keyboard-navigation testing") flag.DurationVar(&cfg.LiveInterval, "live-interval", cfg.LiveInterval, "Synthetic live flamegraph refresh interval for --testliveflames") flag.BoolVar(&cfg.TUIExportEnable, "tuiExport", cfg.TUIExportEnable, "Enable TUI CSV snapshot export files (separate from Parquet recording)") + flag.BoolVar(&cfg.ShowVersion, "version", false, "Print version banner and exit") fields := flag.String("fields", "", fmt.Sprintf("Comma separated list of fields to collapse, valid are: %v", validFields)) flag.StringVar(&cfg.CountField, "count", cfg.CountField, diff --git a/internal/flags/version.go b/internal/flags/version.go index 3db0b9f..583d19b 100644 --- a/internal/flags/version.go +++ b/internal/flags/version.go @@ -5,11 +5,14 @@ import "fmt" // Version is the current application version. const Version = "v0.0.1" -const asciiBannerTemplate = ` ___ _____ ___ _ _ -|_ _| / / _ \ | _ (_)___| |_ - | | / / (_) | | / / _ \ _| -|___/_/ \___/ |_|_\_\___/\__| NG - %s` +const asciiBannerTemplate = ` ██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗ ████████╗ + ██║ ██╔╝ ██╔═══██╗ ██╔══██╗ ██║ ██╔═══██╗ ╚══██╔══╝ + ██║ ██╔╝ ██║ ██║ ██████╔╝ ██║ ██║ ██║ ██║ + ██║ ██╔╝ ██║ ██║ ██╔══██╗ ██║ ██║ ██║ ██║ + ██║██╔╝ ╚██████╔╝ ██║ ██║ ██║ ╚██████╔╝ ██║ + ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ + ⚡ Next-Generation BPF I/O Syscall Tracer ⚡ + %s` // PrintVersion prints the banner with the current version. func PrintVersion() { -- cgit v1.2.3