You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helm/cmd/helm/structure.go

32 lines
697 B

package main
import (
"os"
"path/filepath"
)
const (
repositoriesFilePath string = "repositories.yaml"
cachePath string = "cache"
localRepoPath string = "local"
localRepoCacheFilePath string = "cache.yaml"
)
func homePath() string {
return os.ExpandEnv(helmHome)
}
func cacheDirectory(paths ...string) string {
fragments := append([]string{homePath(), cachePath}, paths...)
return filepath.Join(fragments...)
}
func localRepoDirectory(paths ...string) string {
fragments := append([]string{homePath(), localRepoPath}, paths...)
return filepath.Join(fragments...)
}
func repositoriesFile() string {
return filepath.Join(homePath(), repositoriesFilePath)
}