I run the code
package main
import (
"fmt"
"net/http"
)
func main() {
http.HandleFunc("/", sroot)
http.ListenAndServe(":8080", nil)
}
func sroot(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Welcome")
}
and browser showed a response as expected: Welcome
then, after some time I try to change the output but have found that the output does not change! so, when I change the output fmt.Fprintf(w, "Welcome 123")
but browser still ouptuts Welcome
.
So what's the magic happens here?