質問編集履歴

2

メソッド名訂正

2022/06/15 13:23

投稿

tamahimesama_xz
tamahimesama_xz

スコア27

test CHANGED
File without changes
test CHANGED
@@ -82,7 +82,7 @@
82
82
  v1.GET("/ping", func(c *gin.Context) {
83
83
  c.JSON(200, gin.H{"message": "OK"})
84
84
  })
85
- v1.GET("/piyo", controller.piyo) # <-認識されない
85
+ v1.GET("/piyo", controller.Piyo) # <-認識されない
86
86
  }
87
87
 
88
88
  ```
@@ -94,7 +94,7 @@
94
94
 
95
95
  import "github.com/gin-gonic/gin"
96
96
 
97
- func piyo(c *gin.Context) {
97
+ func Piyo(c *gin.Context) {
98
98
  c.JSON(200, gin.H{"hello": "world"})
99
99
  }
100
100
  ```

1

GoコンテナのGo環境変数状況(一部) 追加

2022/06/15 12:58

投稿

tamahimesama_xz
tamahimesama_xz

スコア27

test CHANGED
File without changes
test CHANGED
@@ -20,6 +20,16 @@
20
20
  └── router
21
21
  └── router.go
22
22
  ```
23
+ ◆GoコンテナのGo環境変数状況(一部)
24
+
25
+ ```env
26
+ GO111MODULE=""
27
+ GOMODCACHE="/go/pkg/mod"
28
+ GOPATH="/go"
29
+ GOROOT="/usr/local/go"
30
+ GOVERSION="go1.18.3"
31
+ ```
32
+
23
33
  ---
24
34
  ### どのように`go mod init`したか
25
35
  ◆「hoge_project」を基準に`go mod init`を実行し、Ginを含めたパッケージのインストールを試しました。