This repository has been archived on 2023-08-08. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
jichan.org-go/click.templ
2023-07-15 20:00:52 -07:00

15 lines
317 B
Text

package main
import "fmt"
func plural(singular, plural string, count uint) string {
if count == 1 {
return singular
} else {
return plural
}
}
templ Click(clicks uint) {
<div>The button has been clicked { fmt.Sprintf("%d", clicks) }{ " " }{ plural("time", "times", clicks) }.</div>
}