func AuthHeaders(log *util.Logger, auth Auth, headers map[string]string) error {
	if strings.ToLower(auth.Type) != "basic" {
		return fmt.Errorf("unsupported auth type: %s", auth.Type)
	}

	basicAuth := auth.User + ":" + auth.Password
	headers["Authorization"] = "Basic " + base64.StdEncoding.EncodeToString([]byte(basicAuth))
	return nil
}
// AuthHeaders creates authorization headers from config
AuthHeaders creates authorization headers from config
// AuthHeaders creates authorization headers from config
func AuthHeaders(log *util.Logger, auth Auth, headers map[string]string) error {
	if strings.ToLower(auth.Type) != "basic" {
		return fmt.Errorf("unsupported auth type: %s", auth.Type)
	}
	basicAuth := auth.User + ":" + auth.Password
	headers["Authorization"] = "Basic " + base64.StdEncoding.EncodeToString([]byte(basicAuth))
	return nil
}
func AuthHeaders ( log * util . Logger , auth Auth , headers map [ string ] string ) error { if strings . ToLower ( auth . Type ) != " " { return fmt . Errorf ( " " , auth . Type ) } basicAuth := auth . User + " " + auth . Password headers [ " " ] = " " + base64 . StdEncoding . EncodeToString ( [ ] byte ( basicAuth ) ) return nil }
AuthHeaders creates authorization headers from config
AuthHeaders creates authorization headers from config