title: go html template table
body: <p>I want to make the table in HTML in go package "temlate" and i want to add rows in loop, but i didn't find how doing this</p>
  
  <p>my code:</p>
  
  <pre><code>package main
  import (
       "net/http"
       "html/template"
  )
  type Devicevalue_view struct {
      Devicetype string
      Iddevice   string
      Devicename string
      Oidname    string
      Value      string
    }
  func page_1(w http.ResponseWriter, r *http.Request){
      for i:=1; i&lt;10; i++{    
          data := Devicevalue_view{
              Devicetype: "devicetype",
              Iddevice: "iddevice",
              Devicename: "devicename",
              Oidname: "oidname",
              Value: "value",
          }   
          tmpl, _ := template.ParseFiles("./index.html")
          tmpl.Execute(w, data)
      }   
  }
  func main() {
      http.HandleFunc("/table", page_1) 
      http.ListenAndServe(":3000", nil)
  }
  </code></pre>
  
  <p>i'm getting this :</p>
  
  <pre><code>
  Devices
  Type    Name    Param   Time    Value
  devicetype  iddevice    devicename  oidname value
  Devices
  Type    Name    Param   Time    Value
  devicetype  iddevice    devicename  oidname value
  ...
  </code></pre>
  
  <p>but i want somthing like this</p>
  
  <pre><code>Devices
  Type    Name    Param   Time    Value
  devicetype  iddevice    devicename  oidname value
  devicetype  iddevice    devicename  oidname value
  ...
  </code></pre>
  
  <p>I don't undestand how connect all cells in one table</p>
  
  <p>index.html:
  <a href="https://drive.google.com/file/d/1HzEL0i3VhiafPzlV8iC0kU8WaSQwoYZY/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1HzEL0i3VhiafPzlV8iC0kU8WaSQwoYZY/view?usp=sharing</a></p>