Skip to content

Commit 38b8896

Browse files
authored
Update 2018-07-04-Gin实践-连载十五-生成二维码-合并海报.md
1 parent 89e7a76 commit 38b8896

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

golang/gin/2018-07-04-Gin实践-连载十五-生成二维码-合并海报.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,14 @@ func GenerateArticlePoster(c *gin.Context) {
408408

409409
其所涉及、关联的库都建议研究一下
410410

411+
### StaticFS
412+
413+
在 routers/router.go 文件,增加如下代码:
414+
415+
```
416+
r.StaticFS("/qrcode", http.Dir(qrcode.GetQrCodeFullPath()))
417+
```
418+
411419
### 验证
412420

413421
![image](https://i.imgur.com/kR1sqR6.jpg)
@@ -424,4 +432,4 @@ func GenerateArticlePoster(c *gin.Context) {
424432

425433
## 参考
426434
### 本系列示例代码
427-
- [go-gin-example](https://github.com/EDDYCJY/go-gin-example)
435+
- [go-gin-example](https://github.com/EDDYCJY/go-gin-example)

0 commit comments

Comments
 (0)