You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
302 B
13 lines
302 B
2 months ago
|
package configStruct
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
type Etcd struct {
|
||
|
Address string `env:"ETCD_ADDRESS" envDefault:"localhost" configPath:"Etcd.Address"`
|
||
|
Port int `env:"ETCD_PORT" envDefault:"2379" configPath:"Etcd.Port"`
|
||
|
}
|
||
|
|
||
|
func (e Etcd) GetAddr() string {
|
||
|
return fmt.Sprintf("%s:%d", e.Address, e.Port)
|
||
|
}
|