先走程序不显示索引页

I followed creating a basic web app with go, I created the folder with name myApp. In myApp have main.go and public folder(in public have index.html), here is my content in main.go:

package main
import "net/http"
import "github.com/russross/blackfriday"

func main() {
  http.HandleFunc("/markdown",  GenerateMarkdown)
  http.Handle("/",  http.FileServer(http.Dir("public")))
  http.ListenAndServe(":8080", nil)
}  

func GenerateMarkdown(rw http.ResponseWriter, r *http.Request) {
  markdown := blackfriday.MarkdownCommon([]byte(r.FormValue("body")))
  rw.Write(markdown)
}

I started server and go to http://localhost:8080/ but it doesn't link to index.html. Can anyone explain why it doesn't render index.html file. I'm a newbie in Golang.

This was answered in the comments, so here is a summary for completeness or something.

The code presented in the question produced the expected results after the actual build->run->test->repeat process was clarified for OP. Points of clarification were as follows:

  1. After using go build to compile the binary, the program isn't running yet. Be sure to actually execute the binary before trying to connect to the server.
  2. If it's necessary to make changes, stop the server, run go build again, then run the new binary.

As a side note, gin is a tool that tries to automate this process by rebuilding and launching your program each time you save the file.