Skip to content

Instantly share code, notes, and snippets.

@jonathan-fielding
Created January 11, 2021 21:49
Show Gist options
  • Save jonathan-fielding/0efd7c6e5948564749456fb9a14f9dcb to your computer and use it in GitHub Desktop.
Save jonathan-fielding/0efd7c6e5948564749456fb9a14f9dcb to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"net/http"
)
func response(w http.ResponseWriter, req *http.Request) {
fmt.Fprintf(w, "Cat fact")
}
func main() {
http.HandleFunc("/", response)
http.ListenAndServe(":8000", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment