I am trying to build a link in my Go template. I want my objects ID to be concatenated with a word to form a dynamic url.
When I print {{.ID}}
on the page, I can see the correct ID printed, I am attempting to build the URL using Printf like so.
{{- $id := printf "/%s/%s" "wallet/" .ID -}}
<a href={{$id}}><h1>Wallet ID {{.ID}}</h1></a>
In my browser it comes out as
http://localhost:8000/wallet//%25!s%28int=1006608996216725456%29
Rather than what it should look like below. ID is of type int.