Spaces:
Sleeping
Sleeping
File size: 348 Bytes
2603033 6afd3ea 2603033 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
package main
import (
"fmt"
"net/http"
"net/url"
)
func main() {
http.HandleFunc("/", HelloServer)
http.ListenAndServe(":8080", nil)
}
func HelloServer(w http.ResponseWriter, r *http.Request) {
m, _ := url.ParseQuery(r.URL.RawQuery)
fmt.Fprintf(w, "Hi to Go Golang https://en.wikipedia.org/wiki/Go_(programming_language) , %s!", m["q"])
} |