// getRootPath returns the root path of the given goPackage. func getRootPath(goPackage *gist7480523.GoPackage) (rootPath string) { if goPackage.Bpkg.Goroot { return "" } goPackage.UpdateVcs() if goPackage.Dir.Repo == nil { return "" } else { return goPackage.Dir.Repo.Vcs.RootPath() } }