You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: client_credentials_provider.go
    path of file: ./repos/plumber/vendor/github.com/apache/pulsar-client-go/oauth2
    
    the code of the file until where you have to start completion: // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor lice
    
func (k *KeyFileProvider) GetClientCredentials() (*KeyFile, error) {
	var keyFile []byte
	var err error
	switch {
	case strings.HasPrefix(k.KeyFile, FILE):
		filename := strings.TrimPrefix(k.KeyFile, FILE)
		keyFile, err = os.ReadFile(filename)
	case strings.HasPrefix(k.KeyFile, DATA):
		keyFile = []byte(strings.TrimPrefix(k.KeyFile, DATA))
	case strings.HasPrefix(k.KeyFile, "data:"):
		url, err := newDataURL(k.KeyFile)
		if err != nil {
			return nil, err
		}
		keyFile = url.Data
	default:
		keyFile, err = os.ReadFile(k.KeyFile)
	}
	if err != nil {
		return nil, err
	}

	var v KeyFile
	err = json.Unmarshal(keyFile, &v)
	if err != nil {
		return nil, err
	}

	return &v, nil
}