github.com/docker/docker@v299999999.0.0-20200612211812-aaf470eca7b5+incompatible/pkg/system/args_windows.go (about)

     1  package system // import "github.com/docker/docker/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  }