自学内容网 自学内容网

《使用Gin框架构建分布式应用》阅读笔记:p32-p51

《用Gin框架构建分布式应用》学习第3天,p32-p51总结,总计20页。

一、技术总结

1.Go知识点

slice, struct。

2.Gin知识点

(1)c.XML()

使用c.XML()解析cmx结构。

(2)c.ShouldBindJSON()

将struct转成json。

gin所有函数参考:https://pkg.go.dev/github.com/gin-gonic/gin

3.版本号命名规范

版本号分为三部分:major, minor, patch。例如现在gin框架最新的tag版本是:v1.10.0(注:小写的v)。从本人实际的开发经历来说,版本号的管理并不是那么严格。用得最多的地方就是git仓库打tag。

4.gitflow model

在团队合作开发的项目中,这部分比较实用,具有实际的指导意义,从这里可以看出来作者是真正写过代码的。作者的gitflow model包含:master(现在多命名为main),hotfix, preprod(有时候也称为release),develop,feature。
在这里插入图片描述

5.xid

xid包可用于生成唯一UID。

二、英语总结

1.tackle

p32, Separating the handler function from the router will be useful in the advanced chapters of this book, when unit uni testing is tackled.

vt. deal with。

2.ingredient

in-(“in”) + gradi(from *ghredh-, “to step, go”)。c. sth forming parts of a mixture(成分,材料)。

三、其它

感觉go的官方文档排版不好,要查文档的时候不好查,不如Python。

四、参考资料

1. 编程

(1) Mohamed Labouardy,《Building Distributed Applications in Gin》:https://book.douban.com/subject/35610349

2. 英语

(1) Etymology Dictionary:https://www.etymonline.com

(2) Cambridge Dictionary:https://dictionary.cambridge.org
在这里插入图片描述

欢迎搜索及关注:编程人(a_codists)


原文地址:https://blog.csdn.net/codists/article/details/142967306

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!