This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new 39e11c7  Use constant for the data prefix (#866)
39e11c7 is described below

commit 39e11c73820bb79fe4af54ea6fb72f1c50e9593c
Author: Joe Zhou <[email protected]>
AuthorDate: Wed Nov 16 02:01:34 2022 -0500

    Use constant for the data prefix (#866)
---
 oauth2/client_credentials_provider.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oauth2/client_credentials_provider.go 
b/oauth2/client_credentials_provider.go
index 78c7228..c112225 100644
--- a/oauth2/client_credentials_provider.go
+++ b/oauth2/client_credentials_provider.go
@@ -55,7 +55,7 @@ func (k *KeyFileProvider) GetClientCredentials() (*KeyFile, 
error) {
        case strings.HasPrefix(k.KeyFile, FILE):
                filename := strings.TrimPrefix(k.KeyFile, FILE)
                keyFile, err = ioutil.ReadFile(filename)
-       case strings.HasPrefix(k.KeyFile, "data://"):
+       case strings.HasPrefix(k.KeyFile, DATA):
                keyFile = []byte(strings.TrimPrefix(k.KeyFile, DATA))
        default:
                keyFile, err = ioutil.ReadFile(k.KeyFile)

Reply via email to