MCPcopy Index your code
hub / github.com/1Panel-dev/KubePi / checkFiles

Function checkFiles

pkg/util/helm/helm.go:62–79  ·  view source on GitHub ↗
(cluster string)

Source from the content-addressed store, hash-verified

60}
61
62func checkFiles(cluster string) {
63
64 var dataPath = helmpath.ConfigPath(cluster)
65 var repositoryPath = dataPath + "/repositories.yaml"
66 var registryPath = dataPath + "/registry.json"
67
68 if _, err := os.Stat(dataPath); os.IsNotExist(err) {
69 os.MkdirAll(dataPath, 0777)
70 os.Chmod(dataPath, 0777)
71 }
72 if _, err := os.Stat(repositoryPath); os.IsNotExist(err) {
73 os.Create(repositoryPath)
74 }
75 if _, err := os.Stat(registryPath); os.IsNotExist(err) {
76 os.Create(registryPath)
77 }
78 return
79}
80
81func NewClient(config *Config) (*Client, error) {
82 client := Client{

Callers 1

GetSettingsFunction · 0.85

Calls 1

CreateMethod · 0.65

Tested by

no test coverage detected