@@ -315,8 +315,8 @@ WithContext binds the command to a context.
315315` ` ` go
316316ctx, cancel := context.WithTimeout(context.Background (), time.Second)
317317defer cancel ()
318- res, err := execx.Command(" go" , " env" , " GOOS" ).WithContext(ctx).Run()
319- fmt.Println(err == nil && res.ExitCode == 0)
318+ res, _ := execx.Command(" go" , " env" , " GOOS" ).WithContext(ctx).Run()
319+ fmt.Println(res.ExitCode == 0)
320320// # bool true
321321` ` `
322322
@@ -325,8 +325,8 @@ fmt.Println(err == nil && res.ExitCode == 0)
325325WithDeadline binds the command to a deadline.
326326
327327` ` ` go
328- res, err := execx.Command(" go" , " env" , " GOOS" ).WithDeadline(time.Now().Add(2 * time.Second)).Run ()
329- fmt.Println(err == nil && res.ExitCode == 0)
328+ res, _ := execx.Command(" go" , " env" , " GOOS" ).WithDeadline(time.Now().Add(2 * time.Second)).Run ()
329+ fmt.Println(res.ExitCode == 0)
330330// # bool true
331331` ` `
332332
@@ -335,8 +335,8 @@ fmt.Println(err == nil && res.ExitCode == 0)
335335WithTimeout binds the command to a timeout.
336336
337337` ` ` go
338- res, err := execx.Command(" go" , " env" , " GOOS" ).WithTimeout(2 * time.Second).Run ()
339- fmt.Println(err == nil && res.ExitCode == 0)
338+ res, _ := execx.Command(" go" , " env" , " GOOS" ).WithTimeout(2 * time.Second).Run ()
339+ fmt.Println(res.ExitCode == 0)
340340// # bool true
341341` ` `
342342
@@ -493,8 +493,8 @@ fmt.Println(out != "")
493493Run executes the command and returns the result and any error.
494494
495495` ` ` go
496- res, err := execx.Command(" go" , " env" , " GOOS" ).Run()
497- fmt.Println(err == nil && res.ExitCode == 0)
496+ res, _ := execx.Command(" go" , " env" , " GOOS" ).Run()
497+ fmt.Println(res.ExitCode == 0)
498498// # bool true
499499` ` `
500500
@@ -504,8 +504,8 @@ Start executes the command asynchronously.
504504
505505` ` ` go
506506proc := execx.Command(" go" , " env" , " GOOS" ).Start()
507- res, err := proc.Wait ()
508- fmt.Println(err == nil && res.ExitCode == 0)
507+ res, _ := proc.Wait ()
508+ fmt.Println(res.ExitCode == 0)
509509// # bool true
510510` ` `
511511
@@ -566,7 +566,7 @@ fmt.Println(out)
566566
567567# ## <a id="creationflags"></a>CreationFlags
568568
569- CreationFlags sets Windows creation flags .
569+ CreationFlags is a no-op on non-Windows platforms .
570570
571571_Example: creation flags_
572572
@@ -584,7 +584,7 @@ fmt.Println(execx.Command("go", "env", "GOOS").CreationFlags(0) != nil)
584584
585585# ## <a id="hidewindow"></a>HideWindow
586586
587- HideWindow controls window visibility and sets CREATE_NO_WINDOW for console apps .
587+ HideWindow is a no-op on non-Windows platforms .
588588
589589_Example: hide window_
590590
@@ -602,7 +602,7 @@ fmt.Println(execx.Command("go", "env", "GOOS").HideWindow(true) != nil)
602602
603603# ## <a id="pdeathsig"></a>Pdeathsig
604604
605- Pdeathsig is a no-op on Windows .
605+ Pdeathsig is a no-op on non-Linux Unix platforms .
606606
607607_Example: pdeathsig_
608608
@@ -627,7 +627,7 @@ fmt.Println(execx.Command("go", "env", "GOOS").Pdeathsig(0) != nil)
627627
628628# ## <a id="setpgid"></a>Setpgid
629629
630- Setpgid is a no-op on Windows .
630+ Setpgid sets the process group ID behavior .
631631
632632_Example: setpgid_
633633
@@ -652,7 +652,7 @@ fmt.Println(execx.Command("go", "env", "GOOS").Setpgid(true) != nil)
652652
653653# ## <a id="setsid"></a>Setsid
654654
655- Setsid is a no-op on Windows .
655+ Setsid sets the session ID behavior .
656656
657657_Example: setsid_
658658
@@ -707,11 +707,11 @@ fmt.Println(err == nil && res.Stdout == "ok")
707707PipeStrict sets strict pipeline semantics.
708708
709709` ` ` go
710- res, err := execx.Command(" false" ).
710+ res, _ := execx.Command(" false" ).
711711 Pipe(" printf" , " ok" ).
712712 PipeStrict ().
713713 Run ()
714- fmt.Println(err == nil && res.ExitCode ! = 0)
714+ fmt.Println(res.ExitCode ! = 0)
715715// # bool true
716716` ` `
717717
0 commit comments