摘要: 1 阅读全文
posted @ 2022-05-10 20:39 许伟强 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 很多时候比如 net.http.Post 会提示我们需要一个 io.Reader 对象,将字符串或者map或者struct或者文件内容是如何转为 io.Reader 对象 ? 一、io.Reader 对象是一个抽象接口 type Reader interface { Read(p []byte) ( 阅读全文
posted @ 2022-05-10 10:20 许伟强 阅读(3622) 评论(0) 推荐(0) 编辑
摘要: 想写一个简单的脚本写数据 使用php发现好多扩展要开,还要装composer 还是继续用golang吧 没想到golang的elastic客户端也是老有一些配置,比如ssl 于是换成简单的post请求 需要将 json 数组读取转字符串,然后绕过 ssl 验证、添加header、添加密码 packa 阅读全文
posted @ 2022-05-10 00:39 许伟强 阅读(45) 评论(0) 推荐(0) 编辑