-
-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Labels
NeedsDecisionIssue needs some more discussion so a decision can be madeIssue needs some more discussion so a decision can be madeenhancementNew feature or requestNew feature or requestgenerator
Description
It is very common to hydrate a template with data, including ints, for say a count
var count int
templ Counter(count int) {
<div>{ fmt.Sprint(count) }</div>
}
Or something similar.
My proposal is for the simple cases where the entire statement between {} valulates to an int we can just convert to a string, since that operation cannot fail, muct like strconv.Itoa
Is this is silly idea for edge cases? I dont know or is it too niche of a use case? looking for feedback
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
NeedsDecisionIssue needs some more discussion so a decision can be madeIssue needs some more discussion so a decision can be madeenhancementNew feature or requestNew feature or requestgenerator