2022-12-20 05:06:29 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2023-04-09 12:33:30 +08:00
|
|
|
"fmt"
|
|
|
|
"log"
|
2022-12-20 05:06:29 +08:00
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2023-04-09 12:33:30 +08:00
|
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
|
|
|
fmt.Fprintf(w, "Hello, Go!")
|
2022-12-20 05:06:29 +08:00
|
|
|
})
|
2023-04-09 12:33:30 +08:00
|
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
2022-12-20 05:06:29 +08:00
|
|
|
}
|