Skip to content

Commit e90f283

Browse files
committed
Remove variables
1 parent 6757dd3 commit e90f283

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

internal/serverless/client.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ var (
4141
)
4242

4343
func NewClient(opts ...ClientOption) (*Client, error) {
44-
apiKeyEnvName := elasticCloudApiKeyEnv
45-
apiKey := os.Getenv(apiKeyEnvName)
44+
apiKey := os.Getenv(elasticCloudApiKeyEnv)
4645
if apiKey == "" {
47-
return nil, fmt.Errorf("unable to obtain value from %s environment variable", apiKeyEnvName)
46+
return nil, fmt.Errorf("unable to obtain value from %s environment variable", elasticCloudApiKeyEnv)
4847
}
4948
c := &Client{
5049
host: defaultHostURL,
@@ -54,8 +53,7 @@ func NewClient(opts ...ClientOption) (*Client, error) {
5453
opt(c)
5554
}
5655

57-
hostEnvName := elasticCloudEndpointEnv
58-
host := os.Getenv(hostEnvName)
56+
host := os.Getenv(elasticCloudEndpointEnv)
5957
if host != "" {
6058
c.host = host
6159
}

0 commit comments

Comments
 (0)