18 lines
334 B
Go
18 lines
334 B
Go
![]() |
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
http.HandleFunc("/mything", handleSomething)
|
||
|
if err := http.ListenAndServe(":8088", nil); err != http.ErrServerClosed {
|
||
|
fmt.Printf("Ouch, server closed: %v\n", err)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func handleSomething(w http.ResponseWriter, r *http.Request) {
|
||
|
fmt.Println("Wohooo, a request!")
|
||
|
}
|