State.Kill works, but it is not immediately obvious how to use it or how to discover that it can be used.
I wrote down my process to discover this, starting from your example and ending with a working prototype on my site: https://pocketgophers.com/expanding-convenience-functions/. Hope this helps. On Wednesday, July 20, 2016 at 3:17:00 PM UTC+2, Walter Garcia wrote: > > Hello James, could you help me? please. > > Thanks in advance > > El martes, 19 de julio de 2016, 2:50:04 (UTC-3), James Aguilar escribió: >> >> State.Kill <https://godoc.org/gopkg.in/pipe.v2#State.Kill> looks >> promising. >> >> On Monday, July 18, 2016 at 10:39:36 AM UTC-7, Walter Garcia wrote: >>> >>> Hello. >>> >>> Im using pipe.v2 and work fine, but I need cancel the process running, >>> How can I do it? >>> >>> The process is running, but in certain circumstances I need to cancel. >>> >>> this is my code >>> >>> p := pipe.Line( >>> pipe.Exec("command1", args_command1...), >>> pipe.Exec("command2", args_command2...), >>> ) >>> output, pipe_err := pipe.CombinedOutput(p) >>> >>> if pipe_err != nil { >>> // ERROR >>> } else { >>> //OK >>> } >>> >>> >>> Please, I need your help. >>> >>> Thanks in advance >>> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.