init.go 343 B

1234567891011121314151617
  1. package test
  2. import (
  3. "go/build"
  4. "os"
  5. "path/filepath"
  6. )
  7. var EtcdBinPath string
  8. func init() {
  9. // Initialize the 'etcd' binary path or default it to the etcd diretory.
  10. EtcdBinPath = os.Getenv("ETCD_BIN_PATH")
  11. if EtcdBinPath == "" {
  12. EtcdBinPath = filepath.Join(build.Default.GOPATH, "src", "github.com", "coreos", "etcd", "etcd")
  13. }
  14. }