func ToHeaders(headersFlag []string) map[string]string {
	headers := make(map[string]string)
	for _, h := range headersFlag {
		kv := strings.SplitN(h, ":", 2)
		if len(kv) == 1 {
			log.Printf("cannot find ':' separator in supplied header %s", h)
			headers[strings.TrimSpace(kv[0])] = ""
			continue
		}
		headers[strings.TrimSpace(kv[0])] = strings.TrimSpace(kv[1])
	}
	return headers
}
ToHeaders converts the headers from the format these are passed by the user to a map.
package util
import (
	"log"
	"strings"
)