一见

上一页 1 2 3 4 5 6 7 8 ··· 75 下一页

2023年12月7日 #

go-zero的etcd配置

摘要: 实现代码在 core/discov/config.go 文件中: type EtcdConf struct { Hosts []string Key string ID int64 `json:",optional"` User string `json:",optional"` Pass stri 阅读全文

posted @ 2023-12-07 17:55 -见 阅读(95) 评论(0) 推荐(0) 编辑

“go mod tidy”之错误“not a valid zip file”

摘要: 执行 go mod tidy 时,遇到如下错误: rpc imports github.com/zeromicro/go-zero/zrpc imports github.com/zeromicro/go-zero/zrpc/resolver imports github.com/zeromicro 阅读全文

posted @ 2023-12-07 17:28 -见 阅读(679) 评论(0) 推荐(0) 编辑

go-zero开发入门-加法客服端示例

摘要: 定义 RPC 接口文件 接口文件 add.proto 的内容如下: syntax = "proto3"; package add; // 当 protoc-gen-go 版本大于 1.4.0 时需加上 go_package,否则编译报错“unable to determine Go import p 阅读全文

posted @ 2023-12-07 15:14 -见 阅读(59) 评论(0) 推荐(0) 编辑

2023年12月6日 #

go-zero开发之安装etcd

摘要: 本文只涉及 Linux 上的安装。 二进制安装 下载二进制安装包 #ETCD_VER=v3.4.28 ETCD_VER=v3.5.10 DOWNLOAD_URL=https://github.com/etcd-io/etcd/releases/download INSTALL_DIR=/tmp rm 阅读全文

posted @ 2023-12-06 23:11 -见 阅读(101) 评论(0) 推荐(0) 编辑

go-zero开发之安装goctl及go-zero开发依赖

摘要: 安装 goctl go 版本在 1.16 及以后执行: GO111MODULE=on&&go install github.com/zeromicro/go-zero/tools/goctl@latest go 版本在 1.16 之前执行: GO111MODULE=on&&go get -u git 阅读全文

posted @ 2023-12-06 22:44 -见 阅读(174) 评论(0) 推荐(0) 编辑

2023年11月22日 #

Go使用开源库go-excelize操作Excel文件

摘要: 以下是一个示例代码,读取一个 Excel 文件并打印其中的所有单元格值: package main import ( "fmt" "github.com/30x/go-excelize" ) func main() { // 打开 Excel 文件 f, err := excelize.OpenFi 阅读全文

posted @ 2023-11-22 14:32 -见 阅读(78) 评论(0) 推荐(0) 编辑

2023年11月10日 #

APISIX源码安装问题解决

摘要: 官网手册的安装语句: curl https://raw.githubusercontent.com/apache/apisix/master/utils/install-dependencies.sh -sL | bash - 执行 install-dependencies.sh 报如下错误: Tr 阅读全文

posted @ 2023-11-10 19:42 -见 阅读(187) 评论(0) 推荐(0) 编辑

2023年9月15日 #

基于python+selenium的自动批量添加

摘要: 场景 点击添加”新增“按钮,弹出”新增对话框“,输入各种数据,然后点击”确定“按钮,如此循环。数量多,这样操作累人。 selenium Selenium 是一个用于自动化 Web 浏览器操作的库,可以实现模拟点击、输入文本等操作。 代码实现 #!/usr/bin/env python3 # -*- 阅读全文

posted @ 2023-09-15 16:05 -见 阅读(57) 评论(0) 推荐(0) 编辑

2023年9月5日 #

取得std::ifstream对象的文件描述符

摘要: 使用C++标准库无法取得std::ifstream对象的文件描述符,但GNU libstdc++库可以取得: #include <fstream> #include <iostream> #include <ext/stdio_filebuf.h> int main() { std::ifstrea 阅读全文

posted @ 2023-09-05 14:18 -见 阅读(14) 评论(0) 推荐(0) 编辑

2023年8月30日 #

利用CONVERT和CAST解决MySQL查询的乱码问题

摘要: 有如下一张表 : ```sql CREATE TABLE t_test_table (f_f1 varchar(16)) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3; ``` 往表 t_test_table 的 f_f1 字段写入的为 阅读全文

posted @ 2023-08-30 17:14 -见 阅读(45) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 75 下一页

导航