code: func getPackagePath(p string) (string, error) {
  	pkg := strings.Split(p, "/")
  
  	for i := len(pkg) - 1; i > 0; i-- {
  		p, err := build.Import(strings.Join(pkg[:i], "/"), "", build.FindOnly)
  		if err != nil {
  			continue
  		}
  		return augPath(p.Dir, pkg[i:]...), nil
  	}
  	return "", errors.New("could not find package path")
  }
docs: // getPackagePath searches through GOPATH to find the filesystem path of the
  // named package.
  //
  // This is complicated by the fact that the named package might not exist. In
  // this case, the package's path will be traversed until one of its parent's
  // paths is found.