戈壁堂

Knowledge Is Action

Go Mixin Go

推荐Go语言入门:Go编程时光对应的微信公众号系列Go 语言入门指南

文章写的通俗易懂,很快就可以过一遍Go语言学习的最小必要知识点。——先“眼到”,至少可以先“读懂”开源项目的代码,然后尝试在开源项目上捣鼓,锻炼“手到”的能力。

Run June

About——先Run起来再说 写完这篇是真的开始Run了,巧合是个周一(5月25日),悦跑圈里统计周期算一周(每周至少跑一次)。到本周就算连

Go

2022 gin 路由信息 简明教程 /user/:name/*role,*代表可选。 // 匹配 /user/geektutu r.GET("/user/:name", func(c *gin.Context) { name := c.Param("name") c.String(http.StatusOK, "Hello %s", name) }) // GET 和 POST 混合 r.POST("/posts", func(c *gin.Context) { id := c.Query("id") page := c.DefaultQuery("page", "0") username := c.PostForm("username")

关于单测哪些事儿

writing-standards-for-unit-testing Unit Test的三A原则: Arrange, Act, Assert Arrange any input data and processing classes needed for the test Perform the action under test Test the results with one or more asserts. Yes, it can be more than one assert, so long as they all work to test the action that was performed. 或者说5个原则 Unit tests have