You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
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>
|
|
}
|