mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-11-29 13:25:14 +00:00
Throw away all backlink-related stuff
This commit is contained in:
@@ -11,8 +11,6 @@ import (
|
||||
|
||||
// Index finds all hypha files in the full `path` and saves them to the hypha storage.
|
||||
func Index(path string) {
|
||||
byNamesMutex.Lock()
|
||||
defer byNamesMutex.Unlock()
|
||||
byNames = make(map[string]*Hypha)
|
||||
ch := make(chan *Hypha, 5)
|
||||
|
||||
@@ -23,11 +21,10 @@ func Index(path string) {
|
||||
|
||||
for h := range ch {
|
||||
// At this time it is safe to ignore the mutex, because there is only one worker.
|
||||
if oldHypha, ok := byNames[h.Name]; ok {
|
||||
oldHypha.MergeIn(h)
|
||||
if oh := ByName(h.Name); oh.Exists {
|
||||
oh.MergeIn(h)
|
||||
} else {
|
||||
byNames[h.Name] = h
|
||||
IncrementCount()
|
||||
h.Insert()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user