github.com/rhatdan/docker@v0.7.7-0.20180119204836-47a0dcbcd20a/pkg/reexec/command_windows.go (about) 1 package 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 }