mirror of
https://github.com/infinite-iroha/touka.git
synced 2026-06-13 15:47:38 +08:00
fix: 修复 examples/httpc 中 c.String 非常量 format string 编译错误
This commit is contained in:
parent
7487369125
commit
390190695f
1 changed files with 2 additions and 2 deletions
|
|
@ -21,7 +21,7 @@ func main() {
|
||||||
c.JSON(http.StatusInternalServerError, touka.H{"error": err.Error()})
|
c.JSON(http.StatusInternalServerError, touka.H{"error": err.Error()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
c.String(http.StatusOK, body)
|
c.String(http.StatusOK, "%s", body)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 示例 2:带 Header 的 POST 请求
|
// 示例 2:带 Header 的 POST 请求
|
||||||
|
|
@ -90,7 +90,7 @@ func main() {
|
||||||
c.JSON(http.StatusInternalServerError, touka.H{"error": err.Error()})
|
c.JSON(http.StatusInternalServerError, touka.H{"error": err.Error()})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
c.String(http.StatusOK, body)
|
c.String(http.StatusOK, "%s", body)
|
||||||
})
|
})
|
||||||
|
|
||||||
fmt.Println("Server running on :8080")
|
fmt.Println("Server running on :8080")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue