Run of fresh-snapshots for golang-github-cosiner-argv

Merge these changes:

Summary

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

Diff

Branch: main

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 9590293..193bea9 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>  Thu, 31 Mar 2022 09:12:04 -0000
+
 golang-github-cosiner-argv (0.1.0-2) unstable; urgency=medium
 
   * Team upload.

Branch: pristine-tar

diff --git a/golang-github-cosiner-argv_0.1.0+git20200416.1.86e3c68.orig.tar.gz.delta b/golang-github-cosiner-argv_0.1.0+git20200416.1.86e3c68.orig.tar.gz.delta
new file mode 100644
index 0000000..40711c5
Binary files /dev/null and b/golang-github-cosiner-argv_0.1.0+git20200416.1.86e3c68.orig.tar.gz.delta differ
diff --git a/golang-github-cosiner-argv_0.1.0+git20200416.1.86e3c68.orig.tar.gz.id b/golang-github-cosiner-argv_0.1.0+git20200416.1.86e3c68.orig.tar.gz.id
new file mode 100644
index 0000000..5af1825
--- /dev/null
+++ b/golang-github-cosiner-argv_0.1.0+git20200416.1.86e3c68.orig.tar.gz.id
@@ -0,0 +1 @@
+19f7c5ac26d20c454414098602290bbc1f6d050c

Branch: upstream

Tag: upstream/0.1.0+git20200416.1.86e3c68
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 {

Publish Blockers

  • ☑ run was successful
  • ☑ package has not been removed from the archive
  • ☑ command has not changed
  • ☒ not yet reviewed, but review needed
  • ☑ 0 publish attempts so far.not currently attempting to back off
  • ☒ merge proposals for the package maintainer are currently being rate-limited (open: 1257, max open: 300)
  • ☑ change set e707944a-1b76-4501-8d20-96aa5e41ede3 is ready

Resulting package

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

Full worker log Full build log