diff options
| author | ewy <ewy0@protonmail.com> | 2026-05-17 01:56:44 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-05-17 01:56:44 +0200 |
| commit | 5e71045120ba15087b45ba7a46b8dc12532e87c7 (patch) | |
| tree | 40131d497ec6e291c4b48bd1006b76427414310f /indexers/pikdex/index.go | |
| parent | f5807d9f3a6c96e70912b61fac17120f412b5782 (diff) | |
fix existing tests and import loop
Diffstat (limited to 'indexers/pikdex/index.go')
| -rw-r--r-- | indexers/pikdex/index.go | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/indexers/pikdex/index.go b/indexers/pikdex/index.go index 64e76e6..70cfabb 100644 --- a/indexers/pikdex/index.go +++ b/indexers/pikdex/index.go @@ -3,6 +3,7 @@ package pikdex import ( "errors" "github.com/ewy1/pik/model" + "github.com/ewy1/pik/paths" "github.com/ewy1/pik/spool" "io/fs" "os" @@ -13,26 +14,6 @@ import ( "sync" ) -var Roots = []string{ - - // current name - ".pik", - "_pik", - - // program names from a previous life - ".godo", - "_godo", - ".pik", - "_uwu", - - //utility - ".bin", - "_bin", - "tasks", - ".tasks", - "_tasks", -} - var SkippedFolders = []string{ ".git", ".config", @@ -50,7 +31,7 @@ func (u *pikdex) Init() error { return nil } self = strings.TrimSuffix(self, ".exe") - Roots = append(Roots, "."+self, "_"+self) + paths.Roots = append(paths.Roots, "."+self, "_"+self) return nil } @@ -163,7 +144,7 @@ func (u *pikdex) WantsWalk(f fs.FS) (bool, string, error) { } for _, e := range entries { - for _, r := range Roots { + for _, r := range paths.Roots { if e.Name() == r && e.IsDir() { return true, r, nil } |
