上一页 1 2 3 4 5 6 7 8 9 10 ··· 22 下一页
  2022年9月2日
摘要: package utils import ( "fmt" "github.com/shopspring/decimal" "math" "math/rand" "testing" "time" ) func init() { // 初始化rand模块的Seed,要不然所有的随机值会一样~ rand. 阅读全文
posted @ 2022-09-02 17:21 江湖乄夜雨 阅读(654) 评论(0) 推荐(0) 编辑
  2022年8月21日
摘要: package go_tests import ( "bytes" "fmt" "testing" ) // 值类型与引用类型 func TestT55(t *testing.T) { a := 123 b := a // 指向不同的内存地址 fmt.Printf("a: %d, %p \n", a 阅读全文
posted @ 2022-08-21 11:04 江湖乄夜雨 阅读(49) 评论(0) 推荐(0) 编辑
  2022年7月14日
摘要: AES加解密的类 python解释器用的是3.9,安装Crypto相关模块报错的解决方案:https://stackoverflow.com/questions/19623267/importerror-no-module-named-crypto-cipher import base64 from 阅读全文
posted @ 2022-07-14 11:51 江湖乄夜雨 阅读(513) 评论(0) 推荐(0) 编辑
  2022年6月27日
摘要: package random_string import ( "encoding/hex" "fmt" "math/rand" "testing" "time" ) // 长度为62 var bytes []byte = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcde 阅读全文
posted @ 2022-06-27 18:03 江湖乄夜雨 阅读(3181) 评论(0) 推荐(0) 编辑
摘要: 视频:https://www.bilibili.com/video/BV1mB4y1p79d/ 项目地址:https://gitee.com/huoyingwhw/request_ratelimit 阅读全文
posted @ 2022-06-27 18:02 江湖乄夜雨 阅读(180) 评论(0) 推荐(0) 编辑
  2022年6月25日
摘要: B站视频:https://www.bilibili.com/video/BV16S4y1e7eH/?vd_source=0bed7ecd22f81e2fed5ccaab40168b8c 项目地址:https://gitee.com/huoyingwhw/go_async_task 阅读全文
posted @ 2022-06-25 09:20 江湖乄夜雨 阅读(318) 评论(0) 推荐(0) 编辑
  2022年4月28日
摘要: package scripts_stroage import ( "fmt" "github.com/shopspring/decimal" "strconv" "testing" ) // 保留2位小数 —— 带四舍五入 func TestT81(t *testing.T) { var userC 阅读全文
posted @ 2022-04-28 19:11 江湖乄夜雨 阅读(2885) 评论(1) 推荐(0) 编辑
  2022年4月11日
摘要: 自己总结的博客 optparse模块解析命令行参数的说明及优化 使用optparse模块根据不同的参数创建不同的csv文件 涉及到的flask服务 from flask import Flask app = Flask(__name__) @app.route("/hello_world") def 阅读全文
posted @ 2022-04-11 15:47 江湖乄夜雨 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 修改map结构体成员的问题 Go struct类型的map结构体成员不能修改的问题 值类型数据传地址的修改方法 func change(isT *bool) { *isT = true } func TestChange(t *testing.T) { isT := false change(&is 阅读全文
posted @ 2022-04-11 15:36 江湖乄夜雨 阅读(400) 评论(0) 推荐(0) 编辑
  2022年4月4日
摘要: model包 package model import ( "github.com/xormplus/xorm" "whw_go_scripts/a_xorm_tests/utils" ) const ClassTableName = "class" // 新建一个班级表,用于连表查询的测试 typ 阅读全文
posted @ 2022-04-04 20:28 江湖乄夜雨 阅读(240) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 22 下一页