mirror of
https://github.com/status-im/consul.git
synced 2025-02-02 08:56:43 +00:00
command: fix env var reader for HTTP addr
This commit is contained in:
parent
7a585d7a9b
commit
41ec10a120
@ -43,7 +43,7 @@ func HTTPClient(addr string) (*consulapi.Client, error) {
|
||||
// HTTPClientDC returns a new Consul HTTP client with the given address and datacenter
|
||||
func HTTPClientDC(addr, dc string) (*consulapi.Client, error) {
|
||||
conf := consulapi.DefaultConfig()
|
||||
if envAddr := os.Getenv("CONSUL_HTTP_ADDR"); addr != "" {
|
||||
if envAddr := os.Getenv("CONSUL_HTTP_ADDR"); envAddr != "" {
|
||||
addr = envAddr
|
||||
}
|
||||
conf.Address = addr
|
||||
|
Loading…
x
Reference in New Issue
Block a user