Documentation ¶
Overview ¶
package main
import (
"html/template" "log" "os"
)
type DataCsv struct { Date string Open float64 }
type dataCsvOverall []DataCsv
var tpl *template.Template
func init(){ tpl = template.Must(template.ParseGlob("tpl.gohtml")) }
func main() { data := dataCsvOverall{ DataCsv{ Date: "2015-07-09", Open: 523.119995, }, DataCsv{ Date: "2015-07-08 ", Open: 521.049988, }, DataCsv{ Date: "2015-07-07 ", Open: 523.130005, }, } err := tpl.Execute(os.Stdout, data) if err != nil { log.Fatalf("%s sdjhfgjhsfgjhds",err) } }
Click to show internal directories.
Click to hide internal directories.