MCPcopy
hub / github.com/cyclops-ui/cyclops / readValuesFile

Function readValuesFile

cyclops-ctrl/pkg/template/git.go:360–377  ·  view source on GitHub ↗
(fs billy.Filesystem, path string)

Source from the content-addressed store, hash-verified

358}
359
360func readValuesFile(fs billy.Filesystem, path string) ([]byte, error) {
361 valuesFile, err := fs.Open(path2.Join(path, "values.yaml"))
362 if err != nil {
363 if err.Error() == "file does not exist" {
364 return []byte(""), nil
365 }
366
367 return nil, err
368 }
369
370 var c bytes.Buffer
371 _, err = io.Copy(bufio.NewWriter(&c), valuesFile)
372 if err != nil {
373 return nil, err
374 }
375
376 return c.Bytes(), nil
377}
378
379func clone(repoURL, commit string, creds *auth.Credentials) (billy.Filesystem, error) {
380 // region clone from git

Callers 1

Calls 2

ErrorMethod · 0.80
BytesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…