713593da4e
You can now run "photoprism auth add" to create new client access tokens that allow external applications to use the built-in REST API. Signed-off-by: Michael Mayer <michael@photoprism.app>
14 lines
239 B
Go
14 lines
239 B
Go
package txt
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
// NTimes converts an integer to a string in the format "n times" or returns an empty string if n is 0.
|
|
func NTimes(n int) string {
|
|
if n < 2 {
|
|
return ""
|
|
} else {
|
|
return fmt.Sprintf("%d times", n)
|
|
}
|
|
}
|