golang代码测试(code review) 【摘要】 TDD(Test Driven Development),测试驱动开发。期望局部最优到全局最优,这个是一种非常不错的好习惯 我们来了解golang的测试之前我们,先了解一下go语言自带的测试工具 go test工具 Go语言中的测试依赖go test命令。编写测试代码和编写普通的Go代码过程是类似的,并不需要学习新...
gitlab merge request robot 是一个 golang 编写的 gitlab mr 请求处理扩展服务。 由于gitlab(free plan)的 Merge Request 功能有限, 不能支持多人 Code Reivew。因此引入第三方机器人进行 MR 合法性仲裁。 设计思路 目标的安全: 使用 目标项目和分支 中的.mergebot.yml配置作为机器人判定配置 有意义的文字信...
Effective Go 和 Go Code Review Comments 中介绍了很多有助于编写优雅,高效的 Go 代码的指导性原则,前者可以认为是官方权威指南,而后者则可以算是对前者的补充,原文托管在 Github 上,每个月都会做部分 fix,而网上的中文版大多都是历史版本,无法及时更新,所以想由自己在业余时做些额外的工作,水平一般,能力有限,少...
Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD - go-gitea/gitea
Go Code Review Comments …… Effective Go 和 Go Code Review Comments 中介绍了很多有助于编写优雅,高效的 Go 代码的指导性原则,前者可以认为是官方权威指南,而后者则可以算是对前者的补充,原文托管在 Github 上,每个月都会做部分 fix,而网上的中文版大多都是历史版本,无法及时更新,所以想由自己在业余时做些...
git: worktree_status, took into account code review remarks Jan 16, 2025 worktree_status_test.go plumbing: filemode, Remove check for setting size of .git/index file (#… Aug 7, 2024 worktree_test.go Merge pull request #1358 from BeChris/issue1150 Jan 16, 2025 worktree_unix_other.go Wo...
代码规范其实是一个老生常态的问题,我们也不能免俗还是要简单介绍一下相关的内容,Go 语言比较常见并且使用广泛的代码规范就是官方提供的 Go Code Review Comments,无论你是短期还是长期使用 Go 语言编程,都应该至少完整地阅读一遍这个官方的代码规范指南,它既是我们在写代码时应该遵守的规则,也是在代码审查时需要注意...
Use the following code snippet as a starting point and replace all instances of ?? with the correct syntax:Go Copy package main import "fmt" func findprimes(number int) bool { for i := 2; i ?? number; i ?? { if number ?? i == ?? { return false } } if number ?? { ...
Sky was such an easy experience. Purchased tickets on klook for around $15 USD and made my way to the elevator and observation deck. Entries are timed which probably helped the experience as the top didn't feel crowded at all. There's a nice open air space on to...
To publish it at https://myusername.github.io/my-app, run: npm install --save gh-pages Alternatively you may use yarn: yarn add gh-pages Add the following scripts in your package.json: "scripts": { + "predeploy": "npm run build", + "deploy": "gh-pages -d build", "start"...