/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
pkg/fs/done.go
37 строк
685 B
Michael Mayer
CI: Apply Go linter recommendations to remaining "pkg/..." code #5330
22 ноя 2025, 18:14
22 ноя 2025, 18:14
149f5e5
Код
Авторство
О чём код?
package fs // Status indicates whether a path was seen or processed. type Status int8 const ( // Found marks a path as seen. Found Status = 1 // Processed marks a path as fully handled. Processed Status = 2 ) // Done stores per-path processing state. type Done map[string]Status // Processed counts the number of processed files. func (d Done) Processed() int { count := 0 for _, s := range d { if s.Processed() { count++ } } return count } // Exists reports whether any status is recorded. func (s Status) Exists() bool { return s > 0 } // Processed returns true if the path was marked as processed. func (s Status) Processed() bool { return s >= Processed }