github.com/macb/etcd@v0.3.1-0.20140227003422-a60481c6b1a0/tests/functional/init.go (about)

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