From 3c2ee72b9fcbb96d3edae2a24d2ce7ce8c1a872b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BE=86=EF=BD=AC=EF=BD=A7=EF=BD=A7=EF=BD=A7-=E2=95=AC?= =?UTF-8?q?=E2=95=AC=28=E2=95=AC=5E=E0=B2=A0=EF=BD=98=E0=B2=A0=29=E2=99=AD?= Date: Wed, 30 Nov 2022 16:13:41 +0900 Subject: [PATCH 1/4] initial commit --- go/study/ch06_http/go.mod | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 go/study/ch06_http/go.mod diff --git a/go/study/ch06_http/go.mod b/go/study/ch06_http/go.mod new file mode 100644 index 00000000..ff334f72 --- /dev/null +++ b/go/study/ch06_http/go.mod @@ -0,0 +1,3 @@ +module github.com/tecyokomichi/WebAppLearning/go/base/ch06_http + +go 1.19 From 8671ce68b103d0e555e9ced1d01ad53406f66dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BE=86=EF=BD=AC=EF=BD=A7=EF=BD=A7=EF=BD=A7-=E2=95=AC?= =?UTF-8?q?=E2=95=AC=28=E2=95=AC=5E=E0=B2=A0=EF=BD=98=E0=B2=A0=29=E2=99=AD?= Date: Wed, 30 Nov 2022 16:14:39 +0900 Subject: [PATCH 2/4] :+1: add main.go --- go/study/ch06_http/main.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 go/study/ch06_http/main.go diff --git a/go/study/ch06_http/main.go b/go/study/ch06_http/main.go new file mode 100644 index 00000000..2230f427 --- /dev/null +++ b/go/study/ch06_http/main.go @@ -0,0 +1,18 @@ +package main + +import ( + "io" + "log" + "net/http" +) + +func main() { + // Hello world, the web server + + helloHandler := func(w http.ResponseWriter, req *http.Request) { + io.WriteString(w, "Hello, world!\n") + } + + http.HandleFunc("/hello", helloHandler) + log.Fatal(http.ListenAndServe(":8080", nil)) +} From f03eb61fd891912b519452b6e372cb1a5a17b677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BE=86=EF=BD=AC=EF=BD=A7=EF=BD=A7=EF=BD=A7-=E2=95=AC?= =?UTF-8?q?=E2=95=AC=28=E2=95=AC=5E=E0=B2=A0=EF=BD=98=E0=B2=A0=29=E2=99=AD?= Date: Thu, 9 Mar 2023 08:13:50 +0900 Subject: [PATCH 3/4] =?UTF-8?q?:pencil:=20=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E6=94=B9=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/study/ch06_http/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/go/study/ch06_http/main.go b/go/study/ch06_http/main.go index 2230f427..ecb0517a 100644 --- a/go/study/ch06_http/main.go +++ b/go/study/ch06_http/main.go @@ -7,6 +7,7 @@ import ( ) func main() { + // Hello world, the web server helloHandler := func(w http.ResponseWriter, req *http.Request) { From 7c8d165d10af7fa9998e4f7853bb982a29a4aba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EF=BE=86=EF=BD=AC=EF=BD=A7=EF=BD=A7=EF=BD=A7-=E2=95=AC?= =?UTF-8?q?=E2=95=AC=28=E2=95=AC=5E=E0=B2=A0=EF=BD=98=E0=B2=A0=29=E2=99=AD?= Date: Thu, 9 Mar 2023 08:15:06 +0900 Subject: [PATCH 4/4] =?UTF-8?q?:pencil:=20=E3=82=B3=E3=83=A1=E3=83=B3?= =?UTF-8?q?=E3=83=88=E6=94=B9=E8=A1=8C=E3=82=92=E6=88=BB=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go/study/ch06_http/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/go/study/ch06_http/main.go b/go/study/ch06_http/main.go index ecb0517a..2230f427 100644 --- a/go/study/ch06_http/main.go +++ b/go/study/ch06_http/main.go @@ -7,7 +7,6 @@ import ( ) func main() { - // Hello world, the web server helloHandler := func(w http.ResponseWriter, req *http.Request) {