Git Revert 多条已提交的记录
我需要撤销最后的四个提交
如果用* git revert * 一个一个 revert 挺费劲,可以用* git revert OLDER_COMMIT^..NEWER_COMMIT* 这种格式,对应我的工程就是
使用 git 迁移 git 项目并保留提交记录
Golang 依赖注入 (Dependency Injection)
Dependency Injection 🧪
依赖注入是目前很多优秀框架都在使用的一个设计模式。 Dependency Injection 常常简称为:DI。它是实现控制反转(Inversion of Control – IoC)的一个模式。
在各种大工程中少不了各种测试,其中 TDD 就是非常流行的一种,在前端开发中用的比较多的 Jest 就是一种,在 Golang 开发命令行工具的时候也是需要 DI 这种模式来实现命令行测试的。因为传统的测试室获取不到命令行的输入输出的。
Golang 基准测试 (Benchmark)
Golang With SQLLite Practice
K8s 1.15.0 安装记录
环境
hostname | ip | system | |
---|---|---|---|
master | 192.168.33.10 | CentOS7 | |
node1 | 192.168.33.11 | CentOS7 | |
node2 | 192.168.33.12 | CentOS7 | |
node3 | 192.168.33.13 | CentOS7 | |
node4 | 192.168.33.14 | CentOS7 | |
node5 | 192.168.33.15 | CentOS7 |
所有节点上操作
Harbor 安装小记
Go Module 安装不了 golang.org 时的处理方式记录
go: golang.org/x/sys@v0.0.0-20180905080454-ebe1bf3edb33: unrecognized import path "golang.orgnrecognized import path "golang.org/x/sys" (https fetch: G1: dial tcp 216.239.37.1:443: conneet https://golang.org/x/sys?go-get=1: dial tcp 216.239.37.rty did not properly respond after1:443: connectex: A connection attempt failed because the connected host has failed to respoconnected party did not properly respond after a period of time, or established connection failed because connected : unrecognized import path "golang.host has failed to respond.)
...
go: golang.org/x/crypto@v0.0.0-20180904163835-0709b304e793nected party did not properly respo: unrecognized import path "golang.org/x/crypto" (https fed because connected host has failedtch: Get https://golang.org/x/crypto?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a
period of time, or established connection failed because connected host has failed to respond.)
go: error loading module requirements
如上,不能安装 sys 和 crypto 这两个库,用如下方式即可
1 手动加入被墙的包(原始包),一定要记住版本号,实在不知道的话,就试试 v0.0.0;
Go Module 安装不了 golang.org 时的处理方式记录
go: golang.org/x/sys@v0.0.0-20180905080454-ebe1bf3edb33: unrecognized import path "golang.orgnrecognized import path "golang.org/x/sys" (https fetch: G1: dial tcp 216.239.37.1:443: conneet https://golang.org/x/sys?go-get=1: dial tcp 216.239.37.rty did not properly respond after1:443: connectex: A connection attempt failed because the connected host has failed to respoconnected party did not properly respond after a period of time, or established connection failed because connected : unrecognized import path "golang.host has failed to respond.)
...
go: golang.org/x/crypto@v0.0.0-20180904163835-0709b304e793nected party did not properly respo: unrecognized import path "golang.org/x/crypto" (https fed because connected host has failedtch: Get https://golang.org/x/crypto?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a
period of time, or established connection failed because connected host has failed to respond.)
go: error loading module requirements
如上,不能安装 sys 和 crypto 这两个库,用如下方式即可
1 手动加入被墙的包(原始包),一定要记住版本号,实在不知道的话,就试试 v0.0.0;
Npm 安装 git 资源
引言
我们大多数情况下用到的包都是存放在 npmjs.com 这个网站上的,只要我们安装了 Node,我们就可以使用 Node 自带的 npm 包来下载你需要的包;但有时候我们想让我们自己的包或者库私有,哪怎么办呢?很多人就会想到自己搭一个私服,比如 Nexus Repository Manager 和 sinopia; 虽然搭建起来不是很困难,尤其是 sinopia 就是一个 npm 包,安装灰常简单,但是都需要一台服务器,一台服务。.. 一台服。.. 一台。.. 一。..