khalfella

Untitled

Mar 4th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "net/http"
  6. )
  7.  
  8. func mainHandler(w http.ResponseWriter, req *http.Request) {
  9. fmt.Fprintf(w, "Hey you are here")
  10. req.Body.Close()
  11. }
  12.  
  13. func main() {
  14. http.HandleFunc("/", mainHandler)
  15. http.ListenAndServe(":8080", nil)
  16. }
Advertisement
Add Comment
Please, Sign In to add comment