MCPcopy Create free account
hub / github.com/timelinize/timelinize / saveInteractiveGraphFromRootNode

Method saveInteractiveGraphFromRootNode

timeline/interactive.go:58–72  ·  view source on GitHub ↗
(rootNode *Graph)

Source from the content-addressed store, hash-verified

56}
57
58func (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
74func (p *processor) assignGraphIDs(g *Graph) {
75 if g == nil {

Callers 1

interactiveGraphMethod · 0.95

Calls 2

tempGraphFolderMethod · 0.95
CloseMethod · 0.45

Tested by

no test coverage detected