-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,074 additions
and
822 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: main | ||
on: [push] | ||
jobs: | ||
op: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
- run: '"$(wget -O- lesiw.io/op | sh)"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
linters: | ||
enable: | ||
- errname | ||
- errcheck | ||
- gocheckcompilerdirectives | ||
- gocyclo | ||
- lll | ||
- makezero | ||
- godot | ||
- unparam | ||
- unused | ||
|
||
linters-settings: | ||
gocyclo: | ||
min-complexity: 15 | ||
lll: | ||
tab-width: 4 | ||
line-length: 79 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add445f6-5937-4cde-af0a-e898da9db005 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module ops.localhost | ||
|
||
go 1.23.1 | ||
|
||
require ( | ||
labs.lesiw.io/ops v0.0.0-20240924235308-80435cd25815 | ||
lesiw.io/ops v0.9.0 | ||
) | ||
|
||
require ( | ||
golang.org/x/sync v0.7.0 // indirect | ||
lesiw.io/clerk v0.1.0 // indirect | ||
lesiw.io/cmdio v0.0.0-20240723224912-c34a917524ae // indirect | ||
lesiw.io/flag v0.7.0 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= | ||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= | ||
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= | ||
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= | ||
gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= | ||
gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= | ||
labs.lesiw.io/ops v0.0.0-20240924235308-80435cd25815 h1:zRGYAjG5IQMcBYHZ9d9Ev2H5GCBNQ5iWZBNBZyqrFQE= | ||
labs.lesiw.io/ops v0.0.0-20240924235308-80435cd25815/go.mod h1:ObOCJfTxz4pLbeeps37n0bEfzkbPlalhNppV0uhZ/ak= | ||
lesiw.io/clerk v0.1.0 h1:hamIinfP4nfr6cxqV9z8ZdQqRif9IlprC9mjRPkG3Dk= | ||
lesiw.io/clerk v0.1.0/go.mod h1:WMyvgTe+3Eob36b6KX86MOaxaeNMvv/HZTSsf2Dedhg= | ||
lesiw.io/cmdio v0.0.0-20240723224912-c34a917524ae h1:aqHZcLDlBAa0oDoE+t2K7tGDBtHKB60eEou/Z76vtKg= | ||
lesiw.io/cmdio v0.0.0-20240723224912-c34a917524ae/go.mod h1:1QvHpQzUItUIaITiA5aQAdZEvaNXn5c98EOaRxVsfXs= | ||
lesiw.io/flag v0.7.0 h1:+8rTdoplDMBhOSKok5eKP6ZuLLPTodkDABRY7jfX5JU= | ||
lesiw.io/flag v0.7.0/go.mod h1:bJx6Hir8MAXkNiO6BbrvhwZuaJF4rQWthQ7pc1DlWZY= | ||
lesiw.io/ops v0.9.0 h1:39Y7rNC2KXB+AS7Hi6xSf45iiqjnM2Ou6YmXxjndQHA= | ||
lesiw.io/ops v0.9.0/go.mod h1:13u2irogMVNWiZqfom1d4FGPnK4c1iCQ53QvwsRIJbE= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"labs.lesiw.io/ops/golib" | ||
"lesiw.io/ops" | ||
) | ||
|
||
type Ops struct{ golib.Ops } | ||
|
||
func main() { | ||
if len(os.Args) < 2 { | ||
os.Args = append(os.Args, "check") | ||
} | ||
ops.Handle(Ops{}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.github/workflows/main.yml 62efcdd9a8f00f489693e4f0f916429822dc311f | ||
.golangci.yml 179a5718940f1682437550116dc75276b12d950e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cmdio_test | ||
|
||
import ( | ||
"io" | ||
"log" | ||
|
||
"lesiw.io/cmdio" | ||
"lesiw.io/cmdio/sys" | ||
) | ||
|
||
// nolint: errcheck | ||
func ExampleCopy() { | ||
rnr := sys.Runner() | ||
|
||
defer rnr.Run("rm", "-f", "/tmp/cmdio_test.txt") | ||
_, err := cmdio.Copy( | ||
io.Discard, | ||
rnr.Command("echo", "hello world"), | ||
rnr.Command("tee", "/tmp/cmdio_test.txt"), | ||
) | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
err = rnr.Run("cat", "/tmp/cmdio_test.txt") | ||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
// Output: | ||
// hello world | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.