mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
17 lines
389 B
Go
17 lines
389 B
Go
|
package system // import "github.com/docker/docker/pkg/system"
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
|
||
|
"golang.org/x/sys/windows"
|
||
|
)
|
||
|
|
||
|
// EscapeArgs makes a Windows-style escaped command line from a set of arguments
|
||
|
func EscapeArgs(args []string) string {
|
||
|
escapedArgs := make([]string, len(args))
|
||
|
for i, a := range args {
|
||
|
escapedArgs[i] = windows.EscapeArg(a)
|
||
|
}
|
||
|
return strings.Join(escapedArgs, " ")
|
||
|
}
|