浏览代码

first commit

Алексей Варламов 2 年之前
当前提交
d173be756a
共有 1 个文件被更改,包括 26 次插入0 次删除
  1. 26 0
      main.go

+ 26 - 0
main.go

@@ -0,0 +1,26 @@
+package main
+
+import (
+	"log"
+	"net/http"
+)
+
+func main() {
+	gugugaga()
+}
+
+func gugugaga() {
+	http.HandleFunc("/ok/", status200)
+	http.HandleFunc("/info/", information)
+	err := http.ListenAndServe(":7070", nil)
+	if err != nil {
+		log.Fatal("ListenAndServer:", err)
+		return
+	}
+}
+func status200(w http.ResponseWriter, r *http.Request) {
+	w.Write([]byte("статус 200"))
+}
+func information(w http.ResponseWriter, r *http.Request) {
+	w.Write([]byte("группа 792(4)\n Варламов Алексей"))
+}