(dir string)
| 61 | var highestCache sync.Map |
| 62 | |
| 63 | func scanHighestVN(dir string) int { |
| 64 | entries, err := os.ReadDir(dir) |
| 65 | if err != nil { |
| 66 | return -1 |
| 67 | } |
| 68 | highest := -1 |
| 69 | for _, e := range entries { |
| 70 | if !e.IsDir() { |
| 71 | continue |
| 72 | } |
| 73 | if n, ok := versionFromDir(e.Name()); ok && n > highest { |
| 74 | highest = n |
| 75 | } |
| 76 | } |
| 77 | return highest |
| 78 | } |
no test coverage detected