main.go 509 B

1234567891011121314151617181920212223242526
  1. package main
  2. import (
  3. "log"
  4. "net/http"
  5. )
  6. func main() {
  7. gugugaga()
  8. }
  9. func gugugaga() {
  10. http.HandleFunc("/ok/", status200)
  11. http.HandleFunc("/info/", information)
  12. err := http.ListenAndServe(":7070", nil)
  13. if err != nil {
  14. log.Fatal("ListenAndServer:", err)
  15. return
  16. }
  17. }
  18. func status200(w http.ResponseWriter, r *http.Request) {
  19. w.Write([]byte("статус 200"))
  20. }
  21. func information(w http.ResponseWriter, r *http.Request) {
  22. w.Write([]byte("группа 792(4)\n Варламов Алексей"))
  23. }