There are two struct:
Offers := "10% Discunt"
SelectUsers := "ALL"
OpenDate := "29-06-2020"
closedDate := "29-07-2020"
}
type ScanInfo struct{
IdScan := "1212"
Longitude := "98.323202"
Latitude:= "34.432201"
}
Go method:
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
tmpl := template.Must(template.ParseFiles("home.html"))
var scans []ScanInfo
var infos []info
tmpl.Execute(w, struct{ ScanData []ScanInfo }{scans})
})
The method which I used to get Single types of data In html table is:
<tbody>
{{ range .ScanData }}
<tr>
<th>{{.IdScan}}</th>
<th>{{.Longitude}}</th>
<th>{{.Latitude}}</th>
</tr>
{{ end }}
</tbody>
Now I want to send both of the struct's (info & ScanInfo's) data into the HTML form (home.html) at a time. Please Suggest's me anyways to send this data, and how can I get this values into the HTML page.