27 lines
423 B
Go
27 lines
423 B
Go
package main
|
|
|
|
import (
|
|
"io"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
http.HandleFunc("/dog/", func(res http.ResponseWriter, req *http.Request) {
|
|
io.WriteString(res, `<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
DOG
|
|
</body>
|
|
</html>`)
|
|
})
|
|
http.HandleFunc("/cat/", func(res http.ResponseWriter, req *http.Request) {
|
|
io.WriteString(res, `<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
CAT
|
|
</body>
|
|
</html>`)
|
|
})
|
|
http.ListenAndServe(":9000", nil)
|
|
}
|