github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/engine/pkg/reexec/command_windows.go (about) 1 package reexec // import "github.com/docker/docker/pkg/reexec" 2 3 import ( 4 "os/exec" 5 ) 6 7 // Self returns the path to the current process's binary. 8 // Uses os.Args[0]. 9 func Self() string { 10 return naiveSelf() 11 } 12 13 // Command returns *exec.Cmd which has Path as current binary. 14 // For example if current binary is "docker.exe" at "C:\", then cmd.Path will 15 // be set to "C:\docker.exe". 16 func Command(args ...string) *exec.Cmd { 17 return &exec.Cmd{ 18 Path: Self(), 19 Args: args, 20 } 21 }