示例#1
0
func init() {
	packageCacheLocation = config.GetPackageCachePath() + "/" + repoIndixFile
	data, err := ioutil.ReadFile(packageCacheLocation)
	if os.IsNotExist(err) {
		allRepositories = DefaultRepositories()
	} else {
		handleErrorIfAny(err)
	}
	if allRepositories == nil {
		allRepositories, err = Deserialize(data)
		handleErrorIfAny(err)
	}
}
示例#2
0
// LocationOnDisk returns the physical location on disk
// where this repository is being maintained
func (r *Repository) LocationOnDisk() string {
	return config.GetPackageCachePath() + "/" + r.Name
}