aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-12-27 17:11:55 -0500
committerEugene Triguba <hello@eugenetriguba.com>2025-12-27 17:11:55 -0500
commit7c653f8892e5741f89324bc72457a3eb44881f9b (patch)
treee2d2b5c8f1c61bb8258dd55f7e6fa53232762bbf
parentRelease v0.1.0 (diff)
downloadssg-7c653f8892e5741f89324bc72457a3eb44881f9b.zip
Fix top-level -h output with ssg -h
There was a bug in subcmd that upgrading to v0.5.0 fixes where using -h on the top-level command would result in a mostly empty help page.
-rw-r--r--CHANGELOG.md5
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--main.go2
4 files changed, 8 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4838dc9..ee1411a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,5 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+### Fixed
+
+- `-h` flag now displays usage information with exit code 0.
+
## [0.1.0] - 2025-12-27
+- Initial Commit
diff --git a/go.mod b/go.mod
index 6bdb531..c50e01d 100644
--- a/go.mod
+++ b/go.mod
@@ -4,7 +4,7 @@ go 1.25.5
require (
git.sr.ht/~eugenetriguba/checkmate v0.5.0
- git.sr.ht/~eugenetriguba/subcmd v0.4.0
+ git.sr.ht/~eugenetriguba/subcmd v0.5.0
)
require github.com/google/go-cmp v0.6.0 // indirect
diff --git a/go.sum b/go.sum
index 98bd965..0d46401 100644
--- a/go.sum
+++ b/go.sum
@@ -1,6 +1,6 @@
git.sr.ht/~eugenetriguba/checkmate v0.5.0 h1:6AuloFbKgXCsEA7h4mOa8sdGaepKHSlegzHY9QMPmXU=
git.sr.ht/~eugenetriguba/checkmate v0.5.0/go.mod h1:Pxv1PKcBSbOqmoEOZxOBJVv9dHUGU+zcwuwfnGqZEQk=
-git.sr.ht/~eugenetriguba/subcmd v0.4.0 h1:af3rDsbrDDS9Z/u9CHH/1VQOQf46FXrhV41o5TT9xYo=
-git.sr.ht/~eugenetriguba/subcmd v0.4.0/go.mod h1:esfBef99WFG9yXM9DLgmHVK0CGKzBPu/SAxrC1aPQQI=
+git.sr.ht/~eugenetriguba/subcmd v0.5.0 h1:Bw2gihoIvfCp2GBYqa6xz6bdeAqGILnTLIew5dEd/8M=
+git.sr.ht/~eugenetriguba/subcmd v0.5.0/go.mod h1:esfBef99WFG9yXM9DLgmHVK0CGKzBPu/SAxrC1aPQQI=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
diff --git a/main.go b/main.go
index 8b83f62..c5792dc 100644
--- a/main.go
+++ b/main.go
@@ -3,7 +3,6 @@ package main
import (
"context"
- "flag"
"fmt"
"os"
@@ -16,7 +15,6 @@ func main() {
subcmd.Register(&initCmd{}, "")
subcmd.Register(&versionCmd{}, "")
subcmd.Register(subcmd.ManHelpCommand("ssg"), "")
- flag.Parse()
os.Exit(int(subcmd.Execute(context.Background())))
}