diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-22 19:27:25 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-22 19:29:16 +0200 |
| commit | 5e1e840bbcdf8348ae62145e1b7231764fcc5a97 (patch) | |
| tree | dad5d223dc95b643febde31c45beb2d68110aa9c /indexers | |
| parent | f13b2bcf9a3a5ea6afeaa60c7a2e801e8e79a2c1 (diff) | |
update script experiment
Diffstat (limited to 'indexers')
| -rw-r--r-- | indexers/pikdex/index.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/indexers/pikdex/index.go b/indexers/pikdex/index.go index 7328125..9a54502 100644 --- a/indexers/pikdex/index.go +++ b/indexers/pikdex/index.go @@ -10,6 +10,7 @@ import ( "pik/spool" "slices" "strings" + "sync" ) var Roots = []string{ @@ -56,6 +57,7 @@ func (u *pikdex) Init() error { var Indexer = &pikdex{mods: make(map[string]*SourceData)} type pikdex struct { + sync.Mutex mods map[string]*SourceData } @@ -126,7 +128,9 @@ func (u *pikdex) Index(absPath string, f fs.FS, runners []model.Runner) ([]model } return nil }) + u.Lock() u.mods[absPath] = mod + u.Unlock() return targets, err } |
