Feature: Set tagging filters via a config file

This commit is contained in:
Ralph Slooten
2024-04-26 14:52:10 +12:00
parent 65fb188586
commit dddc52a668
7 changed files with 154 additions and 45 deletions

11
internal/tools/utils.go Normal file
View File

@@ -0,0 +1,11 @@
package tools
import "fmt"
// Plural returns a singular or plural of a word together with the total
func Plural(total int, singular, plural string) string {
if total == 1 {
return fmt.Sprintf("%d %s", total, singular)
}
return fmt.Sprintf("%d %s", total, plural)
}