args_windows.go 389 B

12345678910111213141516
  1. package system // import "github.com/docker/docker/pkg/system"
  2. import (
  3. "strings"
  4. "golang.org/x/sys/windows"
  5. )
  6. // EscapeArgs makes a Windows-style escaped command line from a set of arguments
  7. func EscapeArgs(args []string) string {
  8. escapedArgs := make([]string, len(args))
  9. for i, a := range args {
  10. escapedArgs[i] = windows.EscapeArg(a)
  11. }
  12. return strings.Join(escapedArgs, " ")
  13. }