diff --git a/main.go b/main.go new file mode 100755 index 0000000..77a6f87 --- /dev/null +++ b/main.go @@ -0,0 +1,45 @@ +package main + +import ("net/http" ; "io") + +func hello(res http.ResponseWriter, req *http.Request) { + res.Header().Set( + "Content-Type", + "text/html", + ) + io.WriteString( + res, + ` + + + Hello World + + + Hello World! + + `, + ) +} +func omg(res http.ResponseWriter, req *http.Request) { + res.Header().Set( + "Content-Type", + "text/html", + ) + io.WriteString( + res, + ` + + + OMG! + + + OMG! It work's! + + `, + ) +} +func main() { + http.HandleFunc("/hello", hello) + http.HandleFunc("/omg", omg) + http.ListenAndServe(":8080", nil) +}