github.com/undoio/delve@v1.9.0/_fixtures/testnextnethttp.go (about) 1 package main 2 3 import ( 4 "net/http" 5 "runtime" 6 ) 7 8 func main() { 9 http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) { 10 runtime.Breakpoint() 11 msg := "hello, world!" 12 header := w.Header().Get("Content-Type") 13 w.Write([]byte(msg + header)) 14 }) 15 http.HandleFunc("/nobp", func(w http.ResponseWriter, req *http.Request) { 16 msg := "hello, world!" 17 header := w.Header().Get("Content-Type") 18 w.Write([]byte(msg + header)) 19 }) 20 err := http.ListenAndServe(":9191", nil) 21 if err != nil { 22 panic(err) 23 } 24 }