(rootNode *Graph)
| 56 | } |
| 57 | |
| 58 | func (p *processor) saveInteractiveGraphFromRootNode(rootNode *Graph) error { |
| 59 | graphPath := p.tempGraphFolder() |
| 60 | if err := os.MkdirAll(graphPath, 0700); err != nil { |
| 61 | return err |
| 62 | } |
| 63 | file, err := os.Create(filepath.Join(graphPath, "root.graph")) |
| 64 | if err != nil { |
| 65 | return err |
| 66 | } |
| 67 | defer file.Close() |
| 68 | if err := json.NewEncoder(file).Encode(rootNode); err != nil { |
| 69 | return err |
| 70 | } |
| 71 | return file.Sync() |
| 72 | } |
| 73 | |
| 74 | func (p *processor) assignGraphIDs(g *Graph) { |
| 75 | if g == nil { |
no test coverage detected