summaryrefslogtreecommitdiff
path: root/internal/flags
diff options
context:
space:
mode:
Diffstat (limited to 'internal/flags')
-rw-r--r--internal/flags/flags.go4
-rw-r--r--internal/flags/version.go13
2 files changed, 12 insertions, 5 deletions
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() {