From 94af39cb97404a34902175469c07da55bec775be Mon Sep 17 00:00:00 2001 From: Kui Xu Date: Wed, 17 Apr 2024 10:01:59 -0700 Subject: [PATCH] feat(datastore): respect DATASTORE_EMULATOR_HOST setting --- datastore/datastore.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/datastore/datastore.go b/datastore/datastore.go index e156b4a77e48..52680ea275f5 100644 --- a/datastore/datastore.go +++ b/datastore/datastore.go @@ -105,9 +105,7 @@ func NewClientWithDatabase(ctx context.Context, projectID, databaseID string, op // If the emulator is available, dial it without passing any credentials. if addr := os.Getenv("DATASTORE_EMULATOR_HOST"); addr != "" { o = []option.ClientOption{ - internaloption.WithDefaultEndpointTemplate(prodEndpointTemplate), - internaloption.WithDefaultUniverseDomain(prodUniverseDomain), - internaloption.WithDefaultMTLSEndpoint(prodMtlsAddr), + option.WithEndpoint(addr), option.WithoutAuthentication(), option.WithGRPCDialOption(grpc.WithInsecure()), }