瀏覽代碼

Удалить 'main1.go'

gr792_kkm 2 年之前
父節點
當前提交
74245b5e16
共有 1 個文件被更改,包括 0 次插入24 次删除
  1. 0 24
      main1.go

+ 0 - 24
main1.go

@@ -1,24 +0,0 @@
-package main
-
-import (
-	"fmt"
-	"log"
-	"net/http"
-)
-
-func main() {
-	http.HandleFunc("/info", sayhello) //сама страница
-	http.HandleFunc("/Ok", ok)
-	err := http.ListenAndServe(":8080", nil)
-	if err != nil {
-		log.Fatal("ListenAndServe: ", err) //выводит ошибку 404
-	}
-
-}
-
-func sayhello(w http.ResponseWriter, r *http.Request) {
-	fmt.Fprintf(w, "Hello world im Kirill 792")
-}
-func ok(w http.ResponseWriter, r *http.Request) {
-	fmt.Fprintf(w, "http status: 200 Ok")
-}