aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-11-14 00:55:03 -0800
committerEugene Triguba <hello@eugenetriguba.com>2026-11-14 00:55:03 -0800
commit9ce09bbc1f3847458a36ac9ffda0e1416ca7ee23 (patch)
tree3504305a5a6552eeaaef759991401c999b25c73c
parentClarify godoc comments and provide more examples (diff)
downloadsubcmd-9ce09bbc1f3847458a36ac9ffda0e1416ca7ee23.zip
Migrate from sourcehut to git.eugenetriguba.com
-rw-r--r--.builds/test.yml9
-rw-r--r--CHANGELOG.md5
-rw-r--r--README.md13
-rw-r--r--doc.go2
-rw-r--r--go.mod4
-rw-r--r--go.sum4
-rw-r--r--subcmd_test.go5
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
diff --git a/README.md b/README.md
index 329f124..75b58a9 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,15 @@
# subcmd
-[![GoDoc](https://godoc.org/git.sr.ht/~eugenetriguba/subcmd?status.svg)](https://godoc.org/git.sr.ht/~eugenetriguba/subcmd)
+[![GoDoc](https://pkg.go.dev/badge/git.eugenetriguba.com/subcmd.svg)](https://pkg.go.dev/git.eugenetriguba.com/subcmd)
![Version](https://img.shields.io/badge/version-0.5.0-blue)
-[![Build Status](https://builds.sr.ht/~eugenetriguba/subcmd/commits/main.svg)](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.
diff --git a/doc.go b/doc.go
index 0e38488..e661e39 100644
--- a/doc.go
+++ b/doc.go
@@ -17,7 +17,7 @@
// "context"
// "flag"
// "fmt"
-// "git.sr.ht/~eugenetriguba/subcmd"
+// "git.eugenetriguba.com/subcmd"
// "os"
// )
//
diff --git a/go.mod b/go.mod
index 24ff345..e08ea9f 100644
--- a/go.mod
+++ b/go.mod
@@ -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
diff --git a/go.sum b/go.sum
index aa92d03..8492c5d 100644
--- a/go.sum
+++ b/go.sum
@@ -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() {