![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
后端
ELVE960520
golang/c++
展开
-
为什么shell base64编码结果与其他结果不同?
首先我用shell命令:$ echo"teststring"| base64 dGVzdHN0cmluZwo =但是当我使用在线工具时,http://www.motobit.com/util/base64-decoder-encoder.asp的结果是:dGVzdHN0cmluZw ==他们为什么不同?echo输出字符串和末尾的换行符.如果您只想要提供的字符串,请使用echo -n...原创 2021-10-12 20:01:20 · 458 阅读 · 0 评论 -
etcd Error: context deadline exceeded
etcd 错误:{"level":"warn","ts":"2021-09-28T11:39:51.788+0800","logger":"etcd-client","caller":"v3/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc0001f0000/#initially=[etcdn1.wos.58dns.org:2379]","attempt":0,原创 2021-09-28 14:32:15 · 11906 阅读 · 3 评论 -
Go获取键盘输入
Go获取键盘输入之前使用fmt.Scanln获取键盘输入,但是碰到空格就停止输入了使用bufio解决import "bufio"func GetScan() string{ reader := bufio.NewReader(os.Stdin) newStr, err := reader.ReadString('\n') if err != nil{ fmt.Errorf("Scan error %s",err) return "" } return newStr}参考原创 2021-01-12 11:45:25 · 1023 阅读 · 0 评论 -
go使用etcd客户端带用户名密码登陆
为什么这么些博客没有一篇涉及到etcd的密码登陆,无奈自己卡了半天,其实很简单环境go version go1.10.8 darwin/amd64 下载etcd Version: 3.4.14 下载代码(出于公司保护,仅贴出关键代码,go语言操作请参考其他教程)import ( "go.etcd.io/etcd/clientv3" "fmt" "time" "context")func main(){ cli, err := clientv3.New(clientv3..原创 2021-01-07 10:27:18 · 2248 阅读 · 3 评论 -
git不跟踪某个文件/文件夹
git不跟踪某个文件/文件夹编辑当前目录下.git/info/exclude文件vim .git/info/exclude我需要取消跟踪idea# git ls-files --others --exclude-from=.git/info/exclude# Lines that start with '#' are comments.# For a project mostly in C, the following would be a good set of# exclude patt原创 2021-01-06 10:12:22 · 1286 阅读 · 0 评论 -
解决configure.ac:17: error: possibly undefined macro: AC_PROG_LIBTOOL
编译protobuf时遇到+ mkdir -p third_party/googletest/m4+ autoreconf -f -i -Wall,no-obsoleteconfigure.ac:30: error: possibly undefined macro: AC_PROG_LIBTOOL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf doc原创 2020-07-23 17:58:47 · 793 阅读 · 0 评论 -
解决Flask安装后无法找到FLASK_APP问题
解决Flask安装后无法找到FLASK_APP问题问题描述解决办法问题描述在官方文档https://dormousehole.readthedocs.io/en/latest/quickstart.html中启动服务器,系统找不到FLASK_APP变量,因为在虚拟机中操作,为了不污染主系统环境变量解决办法将官方文档hello.py修改为app.py直接执行python -m flask run,不用在前面添加export等操作(我这也是export识别不到)...原创 2020-05-20 17:31:13 · 3932 阅读 · 0 评论