I was following the official Golang tutorial https://golang.org/doc/articles/wiki/, now I’m in the part for editing a page; however, it doesn’t seem to be working
here is my code
func editHandler(w http.ResponseWriter, r *http.Request){
p := loadPage(r.URL.Path[len("/edit/"):])
fmt.Fprintf(w, <form action="/save/%s" method="POST"> <textarea name="body">%s</textarea> <button type="submit">Save</button> </form>
, p.Title, string(p.Body))
}
But for some reason on the website, it shows the plain HTML
And when I Change all of the and input stuff to a simple
Hello World
All the sudden it works
I even tried to have a single line of but still, it shows plain HTML in my browser and replaces backticks
with “Double quotes”
Why is this happening exactly