Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to define emulator host from Config #73

Open
PumpkinSeed opened this issue Feb 21, 2023 · 1 comment
Open

Option to define emulator host from Config #73

PumpkinSeed opened this issue Feb 21, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@PumpkinSeed
Copy link

PumpkinSeed commented Feb 21, 2023

WHAT

Make it possible to pass the Emulator host in the Config.

// example
cfg := wrenchSpanner.Config{
	Project:  "project",
	Instance: "instance",
	Database: "database",
	EmulatorHost: "localhost:9091",
}
spannerCli, err := wrenchSpanner.NewClient(ctx, &cfg)

WHY

Currently if we want to define an emulator host, we need to set the SPANNER_EMULATOR_HOST. Those who using the tool as library it is pretty hard to maintain, because we need to call os.Setenv, which is a pretty bad practices in case of testing.

Edit, in case of approval, I will be happy to work on it.

@PumpkinSeed PumpkinSeed added the enhancement New feature or request label Feb 21, 2023
@kazegusuri
Copy link
Collaborator

It seems good. It's welcome to your contribution. I will review if you create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants