package execlog
import (
shlex "github.com/carapace-sh/carapace-shlex"
"github.com/carapace-sh/carapace/internal/log"
"github.com/carapace-sh/carapace/third_party/golang.org/x/sys/execabs"
)
type Cmd struct {
*execabs .Cmd
}
func Command (name string , arg ...string ) *Cmd {
cmd := &Cmd {
execabs .Command (name , arg ...),
}
return cmd
}
func (c *Cmd ) CombinedOutput () ([]byte , error ) {
log .LOG .Printf ("executing %#v" , shlex .Join (c .Args ))
return c .Cmd .CombinedOutput ()
}
func (c *Cmd ) Output () ([]byte , error ) {
log .LOG .Printf ("executing %#v" , shlex .Join (c .Args ))
return c .Cmd .Output ()
}
func (c *Cmd ) Run () error {
log .LOG .Printf ("executing %#v" , shlex .Join (c .Args ))
return c .Cmd .Run ()
}
func (c *Cmd ) Start () error {
log .LOG .Printf ("executing %#v" , shlex .Join (c .Args ))
return c .Cmd .Start ()
}
func LookPath (file string ) (string , error ) {
return execabs .LookPath (file )
}
The pages are generated with Golds v0.8.2 . (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu .
PR and bug reports are welcome and can be submitted to the issue list .
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds .