MCPcopy Create free account
hub / github.com/Masterminds/glide / Tree

Function Tree

action/tree.go:13–33  ·  view source on GitHub ↗

Tree prints a tree representing dependencies.

(basedir string, showcore bool)

Source from the content-addressed store, hash-verified

11
12// Tree prints a tree representing dependencies.
13func Tree(basedir string, showcore bool) {
14 msg.Warn("The tree command is deprecated and will be removed in a future version")
15 buildContext, err := util.GetBuildContext()
16 if err != nil {
17 msg.Die("Failed to get a build context: %s", err)
18 }
19 myName := buildContext.PackageName(basedir)
20
21 if basedir == "." {
22 var err error
23 basedir, err = os.Getwd()
24 if err != nil {
25 msg.Die("Could not get working directory")
26 }
27 }
28
29 msg.Puts(myName)
30 l := list.New()
31 l.PushBack(myName)
32 tree.Display(buildContext, basedir, myName, 1, showcore, l)
33}

Callers

nothing calls this directly

Calls 4

WarnMethod · 0.80
DieMethod · 0.80
PackageNameMethod · 0.80
PutsMethod · 0.80

Tested by

no test coverage detected