|
@@ -0,0 +1,23 @@
|
|
|
+package main
|
|
|
+import (
|
|
|
+ "log"
|
|
|
+ "net/http"
|
|
|
+ "fmt"
|
|
|
+)
|
|
|
+
|
|
|
+func main() {
|
|
|
+ http.HandleFunc("/ok/", ok)
|
|
|
+ http.HandleFunc("/info/", info)
|
|
|
+ err:= http.ListenAndServe(":8080", nil)
|
|
|
+ if err!=nil{
|
|
|
+ log.Fatal("ListenAndServer:", err)
|
|
|
+ return
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+func ok(w http.ResponseWriter, r*http.Request) {
|
|
|
+ fmt.Fprint(w, "ok")
|
|
|
+}
|
|
|
+func info(w http.ResponseWriter, r*http.Request) {
|
|
|
+ fmt.Fprint(w, "группа 792\n Антонов Сергей")
|
|
|
+}
|