github.com/ncdc/docker@v0.10.1-0.20160129113957-6c6729ef5b74/builder/dockerfile/support.go (about)

     1  package dockerfile
     2  
     3  import "strings"
     4  
     5  func handleJSONArgs(args []string, attributes map[string]bool) []string {
     6  	if len(args) == 0 {
     7  		return []string{}
     8  	}
     9  
    10  	if attributes != nil && attributes["json"] {
    11  		return args
    12  	}
    13  
    14  	// literal string command, not an exec array
    15  	return []string{strings.Join(args, " ")}
    16  }