github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/pkg/system/args_windows.go (about) 1 package system // import "github.com/demonoid81/moby/pkg/system" 2 3 import ( 4 "strings" 5 6 "golang.org/x/sys/windows" 7 ) 8 9 // EscapeArgs makes a Windows-style escaped command line from a set of arguments 10 func EscapeArgs(args []string) string { 11 escapedArgs := make([]string, len(args)) 12 for i, a := range args { 13 escapedArgs[i] = windows.EscapeArg(a) 14 } 15 return strings.Join(escapedArgs, " ") 16 }