
エントリーの編集

エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています

- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
[Golang]メモ - Qiita
func SampleGetAPI(router *gin.RouterGroup) { router.GET("/ping", func(c *gin.Context) { // queryp... func SampleGetAPI(router *gin.RouterGroup) { router.GET("/ping", func(c *gin.Context) { // queryparamerの値を取得する fmt.Println(c.Query("samplequery")) c.JSON(200, gin.H{ "Message": "pong", }) }) } func TestRes(t *testing.T) { resp, _ := http.Get("http://localhost:8080/ping") defer resp.Body.Close() body, _ := io.ReadAll(resp.Body) //これが中身 var post responseBody if err := json.Unmarshal(body, &post); er