diff --git a/clients/go/msd/client.go b/clients/go/msd/client.go index 2e6a47ffbd7..055bebe6f66 100644 --- a/clients/go/msd/client.go +++ b/clients/go/msd/client.go @@ -26,7 +26,7 @@ var _ = ioutil.NopCloser type MSDClient struct { URL string Transport http.RoundTripper - credsHeaders map[string]string + CredsHeaders map[string]string Timeout time.Duration DisableRedirect bool } @@ -38,7 +38,7 @@ func NewClient(url string, transport http.RoundTripper) MSDClient { // AddCredentials adds the credentials to the client for subsequent requests. func (client *MSDClient) AddCredentials(header string, token string) { - client.credsHeaders[header] = token + client.CredsHeaders[header] = token } func (client MSDClient) getClient() *http.Client { @@ -60,10 +60,10 @@ func (client MSDClient) getClient() *http.Client { } func (client MSDClient) addAuthHeader(req *http.Request) { - if len(client.credsHeaders) == 0 { + if len(client.CredsHeaders) == 0 { return } - for key, value := range client.credsHeaders { + for key, value := range client.CredsHeaders { if strings.HasPrefix(key, "Cookie.") { req.Header.Add("Cookie", (key)[7:]+"="+value) } else { diff --git a/clients/go/zms/client.go b/clients/go/zms/client.go index dce138fa55c..537f998a41f 100644 --- a/clients/go/zms/client.go +++ b/clients/go/zms/client.go @@ -26,7 +26,7 @@ var _ = ioutil.NopCloser type ZMSClient struct { URL string Transport http.RoundTripper - credsHeaders map[string]string + CredsHeaders map[string]string Timeout time.Duration DisableRedirect bool } @@ -38,7 +38,7 @@ func NewClient(url string, transport http.RoundTripper) ZMSClient { // AddCredentials adds the credentials to the client for subsequent requests. func (client *ZMSClient) AddCredentials(header string, token string) { - client.credsHeaders[header] = token + client.CredsHeaders[header] = token } func (client ZMSClient) getClient() *http.Client { @@ -60,10 +60,10 @@ func (client ZMSClient) getClient() *http.Client { } func (client ZMSClient) addAuthHeader(req *http.Request) { - if len(client.credsHeaders) == 0 { + if len(client.CredsHeaders) == 0 { return } - for key, value := range client.credsHeaders { + for key, value := range client.CredsHeaders { if strings.HasPrefix(key, "Cookie.") { req.Header.Add("Cookie", (key)[7:]+"="+value) } else { diff --git a/clients/go/zts/client.go b/clients/go/zts/client.go index b6bf4e47e94..284b6baa541 100644 --- a/clients/go/zts/client.go +++ b/clients/go/zts/client.go @@ -26,7 +26,7 @@ var _ = ioutil.NopCloser type ZTSClient struct { URL string Transport http.RoundTripper - credsHeaders map[string]string + CredsHeaders map[string]string Timeout time.Duration DisableRedirect bool } @@ -38,7 +38,7 @@ func NewClient(url string, transport http.RoundTripper) ZTSClient { // AddCredentials adds the credentials to the client for subsequent requests. func (client *ZTSClient) AddCredentials(header string, token string) { - client.credsHeaders[header] = token + client.CredsHeaders[header] = token } func (client ZTSClient) getClient() *http.Client { @@ -60,10 +60,10 @@ func (client ZTSClient) getClient() *http.Client { } func (client ZTSClient) addAuthHeader(req *http.Request) { - if len(client.credsHeaders) == 0 { + if len(client.CredsHeaders) == 0 { return } - for key, value := range client.credsHeaders { + for key, value := range client.CredsHeaders { if strings.HasPrefix(key, "Cookie.") { req.Header.Add("Cookie", (key)[7:]+"="+value) } else { diff --git a/rdl/rdl-gen-athenz-go-client/main.go b/rdl/rdl-gen-athenz-go-client/main.go index ffc4480cfd5..819ddf9ea62 100644 --- a/rdl/rdl-gen-athenz-go-client/main.go +++ b/rdl/rdl-gen-athenz-go-client/main.go @@ -116,7 +116,7 @@ var _ = ioutil.NopCloser type {{client}} struct { URL string Transport http.RoundTripper - credsHeaders map[string]string + CredsHeaders map[string]string Timeout time.Duration DisableRedirect bool } @@ -128,7 +128,7 @@ func NewClient(url string, transport http.RoundTripper) {{client}} { // AddCredentials adds the credentials to the client for subsequent requests. func (client *{{client}}) AddCredentials(header string, token string) { - client.credsHeaders[header] = token + client.CredsHeaders[header] = token } func (client {{client}}) getClient() *http.Client { @@ -150,10 +150,10 @@ func (client {{client}}) getClient() *http.Client { } func (client {{client}}) addAuthHeader(req *http.Request) { - if len(client.credsHeaders) == 0 { + if len(client.CredsHeaders) == 0 { return } - for key, value := range client.credsHeaders { + for key, value := range client.CredsHeaders { if strings.HasPrefix(key, "Cookie.") { req.Header.Add("Cookie", (key)[7:]+"="+value) } else {