(path string)
| 129 | } |
| 130 | |
| 131 | func ReloadFromDisk(path string) (err error) { |
| 132 | id := filepath.Base(path) |
| 133 | nbson, err := ioutil.ReadFile(path + "/" + id + ".bson") |
| 134 | if err != nil { |
| 135 | return |
| 136 | } |
| 137 | node := new(Node) |
| 138 | if err = bson.Unmarshal(nbson, &node); err == nil { |
| 139 | if err = dbUpsert(node); err != nil { |
| 140 | return err |
| 141 | } |
| 142 | } |
| 143 | return |
| 144 | } |
nothing calls this directly
no test coverage detected