mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
19 lines
432 B
Go
19 lines
432 B
Go
package system
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
// EscapeArgs makes a Windows-style escaped command line from a set of arguments
|
|
//
|
|
// Deprecated: this function is no longer used and will be removed in the next release.
|
|
func EscapeArgs(args []string) string {
|
|
escapedArgs := make([]string, len(args))
|
|
for i, a := range args {
|
|
escapedArgs[i] = windows.EscapeArg(a)
|
|
}
|
|
return strings.Join(escapedArgs, " ")
|
|
}
|