github.com/uppal0016/docker_new@v0.0.0-20240123060250-1c98be13ac2c/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  }