code: func init() {
  	tr := utilnet.SetTransportDefaults(&http.Transport{})
  	metadataHTTPClientTimeout := time.Second * 10
  	httpClient := &http.Client{
  		Transport: tr,
  		Timeout:   metadataHTTPClientTimeout,
  	}
  	credentialprovider.RegisterCredentialProvider("google-dockercfg",
  		&credentialprovider.CachingDockerConfigProvider{
  			Provider: &dockerConfigKeyProvider{
  				metadataProvider{Client: httpClient},
  			},
  			Lifetime: 60 * time.Second,
  		})
  
  	credentialprovider.RegisterCredentialProvider("google-dockercfg-url",
  		&credentialprovider.CachingDockerConfigProvider{
  			Provider: &dockerConfigUrlKeyProvider{
  				metadataProvider{Client: httpClient},
  			},
  			Lifetime: 60 * time.Second,
  		})
  
  	credentialprovider.RegisterCredentialProvider("google-container-registry",
  		// Never cache this.  The access token is already
  		// cached by the metadata service.
  		&containerRegistryProvider{
  			metadataProvider{Client: httpClient},
  		})
  }
docs: // init registers the various means by which credentials may
  // be resolved on GCP.