MCPcopy Index your code
hub / github.com/devspace-sh/devspace / Error

Method Error

pkg/devspace/dependency/graph/graph.go:127–140  ·  view source on GitHub ↗

Error implements error interface

()

Source from the content-addressed store, hash-verified

125
126// Error implements error interface
127func (c *CyclicError) Error() string {
128 cycle := []string{getNameOrID(c.path[len(c.path)-1])}
129
130 for _, node := range c.path {
131 cycle = append(cycle, getNameOrID(node))
132 }
133
134 what := "dependency"
135 if c.What != "" {
136 what = c.What
137 }
138
139 return fmt.Sprintf("Cyclic %s found: \n%s", what, strings.Join(cycle, "\n"))
140}
141
142// AddEdge adds a new edge from a node to a node and returns an error if it would result in a cyclic graph
143func (g *Graph) AddEdge(fromID string, toID string) error {

Callers 14

TestRenderFunction · 0.45
TestDeployFunction · 0.45
TestDeployFunction · 0.45
TestStatusFunction · 0.45
TestDeleteFunction · 0.45
TestNewFunction · 0.45
TestRenderFunction · 0.45
TestStatusFunction · 0.45
TestDeleteFunction · 0.45
TestDeployFunction · 0.45
TestGetReplacedManifestFunction · 0.45
TestResolverFunction · 0.45

Calls 1

getNameOrIDFunction · 0.85

Tested by 13

TestRenderFunction · 0.36
TestDeployFunction · 0.36
TestDeployFunction · 0.36
TestStatusFunction · 0.36
TestDeleteFunction · 0.36
TestNewFunction · 0.36
TestRenderFunction · 0.36
TestStatusFunction · 0.36
TestDeleteFunction · 0.36
TestDeployFunction · 0.36
TestGetReplacedManifestFunction · 0.36
TestResolverFunction · 0.36