ちっとお試しあれ
<<みんなでGO>>
main.go
package main
import (
"net/http"
"fmt"
)
func world(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "<a href='/japan'><h1>Hello World</h1></a>")
}
func japan(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "<a href='/'><h1>Hello Japan</h1></a>")
}
func main() {
http.HandleFunc("/", world)
http.HandleFunc("/japan", japan)
http.ListenAndServe("192.168.1.10:8080", nil)
}