We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6757dd3 commit e90f283Copy full SHA for e90f283
1 file changed
internal/serverless/client.go
@@ -41,10 +41,9 @@ var (
41
)
42
43
func NewClient(opts ...ClientOption) (*Client, error) {
44
- apiKeyEnvName := elasticCloudApiKeyEnv
45
- apiKey := os.Getenv(apiKeyEnvName)
+ apiKey := os.Getenv(elasticCloudApiKeyEnv)
46
if apiKey == "" {
47
- return nil, fmt.Errorf("unable to obtain value from %s environment variable", apiKeyEnvName)
+ return nil, fmt.Errorf("unable to obtain value from %s environment variable", elasticCloudApiKeyEnv)
48
}
49
c := &Client{
50
host: defaultHostURL,
@@ -54,8 +53,7 @@ func NewClient(opts ...ClientOption) (*Client, error) {
54
53
opt(c)
55
56
57
- hostEnvName := elasticCloudEndpointEnv
58
- host := os.Getenv(hostEnvName)
+ host := os.Getenv(elasticCloudEndpointEnv)
59
if host != "" {
60
c.host = host
61
0 commit comments