func (p *project) buildFileDeps(prog *goload.Program) map[string]interface{} { pkgDeps := godep.FileDepLoaded(prog) ret := make(map[string]interface{}) for pkg, g := range pkgDeps { m, e := dagvis.Layout(g) if p.err(e) { continue } ret[pkg] = dagvis.JSONMap(m) } return ret }
func (r *repo) fileDeps() (map[string]interface{}, []error) { deps := godep.FileDepLoaded(r.prog) var errs []error ret := make(map[string]interface{}) for pkg, dep := range deps { m, err := dagvis.Layout(dep) if err != nil { errs = append(errs, err) continue } p, err := r.trimPath(pkg) if err != nil { errs = append(errs, err) continue } ret[p] = dagvis.JSONMap(m) } return ret, errs }