init.go 361 B

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