New Upstream Snapshot - golang-github-cosiner-argv

Ready changes

Summary

Merged new upstream version: 0.1.0+git20200416.1.86e3c68 (was: 0.1.0).

Resulting package

Built on 2023-01-11T11:26 (took 8m29s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots golang-github-cosiner-argv-dev

Lintian Result

Diff

diff --git a/README.md b/README.md
index 6e2b495..cf8eefc 100644
--- a/README.md
+++ b/README.md
@@ -13,16 +13,18 @@ Documentation can be found at [Godoc](https://godoc.org/github.com/cosiner/argv)
 # Example
 ```Go
 func TestArgv(t *testing.T) {
-	args, err := argv.Argv([]rune(" ls   `echo /`   |  wc  -l "), argv.ParseEnv(os.Environ()), argv.Run)
+    args, err := Argv(" ls   `echo /`   |  wc  -l ", func(backquoted string) (string, error) {
+		return backquoted, nil
+	}, nil)
 	if err != nil {
-	    t.Fatal(err)
+		t.Fatal(err)
 	}
 	expects := [][]string{
-	    []string{"ls", "/"},
-	    []string{"wc", "-l"},
+		[]string{"ls", "echo /"},
+		[]string{"wc", "-l"},
 	}
 	if !reflect.DeepEqual(args, expects) {
-	    t.Fatal(args)
+		t.Fatal(args)
 	}
 }
 ```
diff --git a/argv_test.go b/argv_test.go
index b08d5c1..3b2b0ea 100644
--- a/argv_test.go
+++ b/argv_test.go
@@ -54,3 +54,19 @@ func TestArgv(t *testing.T) {
 		}
 	}
 }
+
+func TestArgv2(t *testing.T) {
+	args, err := Argv(" ls   `echo /`   |  wc  -l ", func(backquoted string) (string, error) {
+		return backquoted, nil
+	}, nil)
+	if err != nil {
+		t.Fatal(err)
+	}
+	expects := [][]string{
+		[]string{"ls", "echo /"},
+		[]string{"wc", "-l"},
+	}
+	if !reflect.DeepEqual(args, expects) {
+		t.Fatal(args)
+	}
+}
diff --git a/cmd.go b/cmd.go
index f723c60..a589a13 100644
--- a/cmd.go
+++ b/cmd.go
@@ -19,7 +19,7 @@ func Cmds(args ...[]string) ([]*exec.Cmd, error) {
 	return cmds, nil
 }
 
-func Pipe(stdin io.Reader, stdout, stderr io.Writer, cmds ...*exec.Cmd) error {
+func Start(stdin io.Reader, stdout, stderr io.Writer, cmds ...*exec.Cmd) error {
 	if stdin == nil {
 		stdin = os.Stdin
 	}
@@ -57,6 +57,13 @@ func Pipe(stdin io.Reader, stdout, stderr io.Writer, cmds ...*exec.Cmd) error {
 			return err
 		}
 	}
+	return nil
+}
+func Pipe(stdin io.Reader, stdout, stderr io.Writer, cmds ...*exec.Cmd) error {
+	err := Start(stdin, stdout, stderr, cmds...)
+	if err != nil {
+		return err
+	}
 	for i := range cmds {
 		err = cmds[i].Wait()
 		if err != nil {
diff --git a/debian/changelog b/debian/changelog
index b871fde..51ccf91 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-cosiner-argv (0.1.0+git20200416.1.86e3c68-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Wed, 11 Jan 2023 11:21:29 -0000
+
 golang-github-cosiner-argv (0.1.0-3) unstable; urgency=medium
 
   [ Debian Janitor ]

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details