type Page struct {
Title string
Body interface{}
}
type Article struct {
Id string `json: "id"`
Title string `json: "title"`
Pretext string `json: "pretext"`
Text string `json: "text"`
}
if i%3 == 0; i%5 == 0 {
if i%3 == 0 && i%5 == 0 {
if i%3 == 0 {
fmt.Print(i, "Fizz")
}
if i%5 == 0 {
fmt.Print(i, "Buzz")
}
fmt.Println("")
i++
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println(ParseDuration("1h") + ParseDuration("4m"))
}
func ParseDuration(s string) time.Duration {
duration, err := time.ParseDuration(s)
if err != nil {
return 0
}
return duration
}
type crm struct {
Sip string `json:"sip"`
}
{{template "content" .}}
{{template "content" .Categories}}
{{range .}}
<li>{{ .Name}}</li>
{{end}}