The next thing to do is to boil this down to a standalone test case in the
golang playground.
Are you saying the template is not being expanded correctly at line 155?
https://github.com/ali2210/WizDwarf/blob/master/main.go#L155
Are you sure the value of LifeCode is what you expect? Try printin
https://github.com/ali2210/WizDwarf/blob/master/visualize.html
On Wednesday, July 15, 2020 at 3:14:51 PM UTC+5, Ali Hassan wrote:
>
>
> {{range .}}
> {{if ne .Symbol " "}}
>{{.Symbol}}
> {{end}}
>{{end}}
>
>
> var div=document.getElementById('List');
> var point = div.
yes it is https://github.com/ali2210/WizDwarf/blob/master/main.go [line:
150-158]
On Wednesday, July 15, 2020 at 3:14:51 PM UTC+5, Ali Hassan wrote:
>
>
> {{range .}}
> {{if ne .Symbol " "}}
>{{.Symbol}}
> {{end}}
>{{end}}
>
>
> var div=document.getElementById('List');
Yes it is
func Visualize(w http.ResponseWriter, r *http.Request){
temp := template.Must(template.ParseFiles("visualize.html"))
if r.Method == "GET" {
fmt.Println("Url:", r.URL.Path)
fmt.Println("Method:" + r.Method)
temp.Execute(w,LifeCode)
}
}
On Wednesday, July 15, 2020 at 3:14:51 PM UTC+5, Al
Yeah this is Javascript and Go
https://github.com/ali2210/WizDwarf/blob/master/visualize.html
https://github.com/ali2210/WizDwarf/blob/master/js/visual.js
func Visualize(w http.ResponseWriter, r *http.Request){
temp := template.Must(template.ParseFiles("visualize.html"))
if r.Method == "GET
What language is that code written in? It looks more like Javascript than
Go to me.
If you have a problem with some Go code, please can you show the Go code -
ideally as a self-contained runnable example at play.golang.org
--
You received this message because you are subscribed to the Google