diff options
| -rw-r--r-- | .builds/test.yml | 9 | ||||
| -rw-r--r-- | CHANGELOG.md | 5 | ||||
| -rw-r--r-- | README.md | 13 | ||||
| -rw-r--r-- | doc.go | 2 | ||||
| -rw-r--r-- | go.mod | 4 | ||||
| -rw-r--r-- | go.sum | 4 | ||||
| -rw-r--r-- | subcmd_test.go | 5 |
7 files changed, 18 insertions, 24 deletions
diff --git a/.builds/test.yml b/.builds/test.yml deleted file mode 100644 index c676328..0000000 --- a/.builds/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -image: archlinux -packages: - - go -sources: - - https://git.sr.ht/~eugenetriguba/subcmd -tasks: - - test: | - cd subcmd - ./scripts/test.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index f4ce0c2..ac52dc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- The module path is now `git.eugenetriguba.com/subcmd` (previously + `git.sr.ht/~eugenetriguba/subcmd`). + ## [0.5.0] - 2025-12-27 ### Added @@ -1,16 +1,15 @@ # subcmd -[](https://godoc.org/git.sr.ht/~eugenetriguba/subcmd) +[](https://pkg.go.dev/git.eugenetriguba.com/subcmd)  -[](https://builds.sr.ht/~eugenetriguba/subcmd/commits/main?) A simple and flexible subcommand framework for Go, built on top of the standard library's `flag` package. ## Why subcmd? There are more full-featured CLI libraries for Go, like -[cobra](https://github.com/spf13/cobra). If you need complex features, use one -of those. +[cobra](https://github.com/spf13/cobra). If you need more complex features, +those would be a better solution. subcmd is a lightweight wrapper around Go's standard library `flag` package. The entire implementation is a single file with zero production dependencies. @@ -21,7 +20,7 @@ listing commands, and command groups for organization. Because it wraps ## Installation ```bash -go get git.sr.ht/~eugenetriguba/subcmd +go get git.eugenetriguba.com/subcmd ``` ## Example @@ -35,7 +34,7 @@ import ( "fmt" "os" - "git.sr.ht/~eugenetriguba/subcmd" + "git.eugenetriguba.com/subcmd" ) type greetCmd struct { @@ -69,5 +68,5 @@ Hello, Alice! ## Documentation -See the [GoDoc documentation](https://godoc.org/git.sr.ht/~eugenetriguba/subcmd) +See the [GoDoc documentation](https://pkg.go.dev/git.eugenetriguba.com/subcmd) for full documentation. @@ -17,7 +17,7 @@ // "context" // "flag" // "fmt" -// "git.sr.ht/~eugenetriguba/subcmd" +// "git.eugenetriguba.com/subcmd" // "os" // ) // @@ -1,7 +1,7 @@ -module git.sr.ht/~eugenetriguba/subcmd +module git.eugenetriguba.com/subcmd go 1.24.0 -require git.sr.ht/~eugenetriguba/checkmate v0.5.0 +require git.eugenetriguba.com/checkmate v0.6.0 require github.com/google/go-cmp v0.6.0 // indirect @@ -1,4 +1,4 @@ -git.sr.ht/~eugenetriguba/checkmate v0.5.0 h1:6AuloFbKgXCsEA7h4mOa8sdGaepKHSlegzHY9QMPmXU= -git.sr.ht/~eugenetriguba/checkmate v0.5.0/go.mod h1:Pxv1PKcBSbOqmoEOZxOBJVv9dHUGU+zcwuwfnGqZEQk= +git.eugenetriguba.com/checkmate v0.6.0 h1:zoVgja0E/QC+sE8rHTQHQxXQJERF0KN2m51EZv6oWi0= +git.eugenetriguba.com/checkmate v0.6.0/go.mod h1:EHRoN/2R48KUxNvgQcvsMdRme+1e/2IcW6PUBXsJhF4= 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/subcmd_test.go b/subcmd_test.go index e6e5301..b569626 100644 --- a/subcmd_test.go +++ b/subcmd_test.go @@ -9,8 +9,8 @@ import ( "strings" "testing" - "git.sr.ht/~eugenetriguba/checkmate/assert" - "git.sr.ht/~eugenetriguba/checkmate/check" + "git.eugenetriguba.com/checkmate/assert" + "git.eugenetriguba.com/checkmate/check" ) type mockCommand struct { @@ -33,7 +33,6 @@ func (m *mockCommand) Execute(ctx context.Context, f *flag.FlagSet, args ...any) return m.exitStatus } - // setupOsArgs sets up os.Args for testing, // returning a cleanup function that restores the original state. func setupOsArgs(args ...string) func() { |