RemoveChild 移除子依赖
(child *DepGraph)
| 59 | |
| 60 | // RemoveChild 移除子依赖 |
| 61 | func (dep *DepGraph) RemoveChild(child *DepGraph) { |
| 62 | for i, c := range dep.Children { |
| 63 | if c == child { |
| 64 | dep.Children = append(dep.Children[:i], dep.Children[i+1:]...) |
| 65 | break |
| 66 | } |
| 67 | } |
| 68 | for i, p := range child.Parents { |
| 69 | if p == dep { |
| 70 | child.Parents = append(child.Parents[:i], child.Parents[i+1:]...) |
| 71 | break |
| 72 | } |
| 73 | } |
| 74 | delete(dep.cset, child) |
| 75 | delete(child.pset, dep) |
| 76 | } |
| 77 | |
| 78 | func (dep *DepGraph) AppendLicense(lic string) { |
| 79 | if dep.licenseMap == nil { |
no outgoing calls
no test coverage detected