Run it:
func main() { http.HandleFunc("/pickup", randomPickupHandler) http.ListenAndServe(":8080", nil) } simple pickup project go
w.Header().Set("Content-Type", "application/json") json.NewEncoder(w).Encode(resp) } Run it: func main() { http
type PickupResponse struct { Line string json:"line" } Run it: func main() { http.HandleFunc("/pickup"