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.
 
 
 
 
 
 

12 lines
302 B

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)
}