github.com/shishir-a412ed/docker@v1.3.2-0.20180103180333-fda904911d87/integration-cli/registry/requirement.go (about)

     1  package registry
     2  
     3  import "os/exec"
     4  
     5  // Hosting returns wether the host can host a registry (v2) or not
     6  func Hosting() bool {
     7  	// for now registry binary is built only if we're running inside
     8  	// container through `make test`. Figure that out by testing if
     9  	// registry binary is in PATH.
    10  	_, err := exec.LookPath(v2binary)
    11  	return err == nil
    12  }