This renders as a list, each item being a html <a> tag. Clicking one of the list items takes me via http.HandleFunc("/transporterinput", controllers.TransporterInputController)
to the desired page; however, I want to pass the ID with it as well, like you can do with AngularJS, e.g. <a ui-sref="app.transporterInput({id: package.id})”>
I’m using Option A and with fmt.Println(req.URL) I see /transporterinput/2 where 2 is the ID. I’m now delving through the net/url documentation to see how to get the 2 out of the whole lot by going through the URL struct. If you have any suggestions please let me know; perhaps I should write a PERL type function to split the whole lot?
[EDIT]
After fiddling around with Option A, I found Option B the better one. So indeed <a class="postal_green" href="/transporterinput/?id={{.ID}}"> (Note the second / !) and http.HandleFunc("/transporterinput/", controllers.TransporterInputController)
In the handler function
// just checking
err := req.ParseForm()
if err != nil { panic(err) }
theID := req.FormValue(“id”)