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: gcputil.go
    path of file: ./repos/goldfish/vendor/github.com/hashicorp/vault-plugin-auth-gcp/plugin/util
    
    the code of the file until where you have to start completion: package util

import (
	"context"
	"crypto/x509"
	"encoding/base64"
	"encoding/json"
	"encoding/pem"
	"errors"
	"fmt"
	"github.com/hashicorp/go-cleanhttp"
	"golang.org/x/oauth2"
	"golang.org/x/oauth2/jwt"
	googleoauth2 "google.golang.org/api/oauth2/v2"
	"gopkg.in/square/go-jose.v2"
	"net/http"
	"regexp"
	"strings"
)

const (
	labelRegex string = "^(?P<key>[a-z]([\\w-]+)?):(?P<value>[\\w-]*)$"
)

// GcpCredentials represents a simplified version of the Google Cloud Platform credentials file format.
type GcpCredentials struct {
	ClientEmail  string `json:"client_email" structs:"client_email" mapstructure:"client_email"`
	ClientId     string `json:"client_id" structs:"client_id" mapstructure:"client_id"`
	PrivateKeyId string `json:"private_key_id" structs:"private_key_id" mapstructure:"private_key_id"`
	
    
func OAuth2RSAPublicKey(kid, oauth2BasePath string) (interface{}, error) {
	oauth2Client, err := googleoauth2.New(cleanhttp.DefaultClient())
	if err != nil {
		return "", err
	}

	if len(oauth2BasePath) > 0 {
		oauth2Client.BasePath = oauth2BasePath
	}

	jwks, err := oauth2Client.GetCertForOpenIdConnect().Do()
	if err != nil {
		return nil, err
	}

	for _, key := range jwks.Keys {
		if key.Kid == kid && jose.SignatureAlgorithm(key.Alg) == jose.RS256 {
			// Trim extra '=' from key so it can be parsed.
			key.N = strings.TrimRight(key.N, "=")
			js, err := key.MarshalJSON()
			if err != nil {
				return nil, fmt.Errorf("unable to marshal json %v", err)
			}
			key := &jose.JSONWebKey{}
			if err := key.UnmarshalJSON(js); err != nil {
				return nil, fmt.Errorf("unable to unmarshal json %v", err)
			}

			return key.Key, nil
		}
	}

	return nil, fmt.Errorf("could not find public key with kid '%s'", kid)
}