Answer the question
In order to leave comments, you need to log in
Why is only the first element from map picked up?
package main
import (
"html/template"
"os"
)
func main() {
t := template.New("Test Template") // На что влияет имя в кавычках ?
t, _ = t.Parse("hello {{.H}}! {{.HE}}") // Почему подхватывает только первый елемент с карты?
p:= map[string]string{
"H": "Hydrogen",
"He": "Helium",
}
t.Execute(os.Stdout, p)
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question