MCPcopy
hub / github.com/kptdev/kpt / get

Method get

internal/util/sync/sync.go:157–169  ·  view source on GitHub ↗

get fetches the dependency

(dependency kptfile.Dependency)

Source from the content-addressed store, hash-verified

155
156// get fetches the dependency
157func (c Command) get(dependency kptfile.Dependency) error {
158 path := filepath.Join(c.Dir, dependency.Name)
159 fmt.Fprintf(c.StdOut, "fetching %q from %q\n", dependency.Name, path)
160 if c.DryRun {
161 return nil
162 }
163
164 return get.Command{
165 Git: dependency.Git,
166 Destination: path,
167 Name: dependency.Name,
168 }.Run()
169}
170
171// update updates the version of the fetched dependency to match
172func (c Command) update(dependency kptfile.Dependency, k *kptfile.KptFile) error {

Callers 15

syncMethod · 0.95
rFunction · 0.80
iFunction · 0.80
veFunction · 0.80
CeFunction · 0.80
jtFunction · 0.80
qtFunction · 0.80
FtFunction · 0.80
ztFunction · 0.80
BtFunction · 0.80

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected