code: func toBuildkitExtraHosts(inp []string) (string, error) {
  	if len(inp) == 0 {
  		return "", nil
  	}
  	hosts := make([]string, 0, len(inp))
  	for _, h := range inp {
  		parts := strings.Split(h, ":")
  
  		if len(parts) != 2 || parts[0] == "" || net.ParseIP(parts[1]) == nil {
  			return "", errors.Errorf("invalid host %s", h)
  		}
  		hosts = append(hosts, parts[0]+"="+parts[1])
  	}
  	return strings.Join(hosts, ","), nil
  }
docs: // toBuildkitExtraHosts converts hosts from docker key:value format to buildkit's csv format