summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-07 09:47:05 +0300
committerPaul Buetow <paul@buetow.org>2026-05-07 09:47:05 +0300
commited04ccd8e2297458ec97381806a05dea13090f0f (patch)
tree99b707441b6990686bbd2773c177bdc3b8bf3313 /cmd
parentac05beabdbaa90597ed0cfcea781d5ab44d123ba (diff)
update docs and ascii banner
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ior/main.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmd/ior/main.go b/cmd/ior/main.go
index 8d93d28..ebd3ef3 100644
--- a/cmd/ior/main.go
+++ b/cmd/ior/main.go
@@ -23,9 +23,17 @@ func main() {
os.Exit(2)
}
- // Run the internal logic of the application.
// flags.Get() is called here at the CLI boundary so internal code never reads the singleton.
- if err := internal.Run(flags.Get()); err != nil {
+ cfg := flags.Get()
+
+ // Handle -version: print the banner plus version and exit.
+ if cfg.ShowVersion {
+ flags.PrintVersion()
+ return
+ }
+
+ // Run the internal logic of the application.
+ if err := internal.Run(cfg); err != nil {
fmt.Printf("Failed to run: %v\n", err)
os.Exit(2)
}