随笔 - 231  文章 - 205  评论 - 20  阅读 - 41万
04 2022 档案
Golang处理小数四舍五入与不进行四舍五入的用法
摘要: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 江湖乄夜雨 阅读(3981) 评论(1) 推荐(0) 编辑
Python中optparse模块使用小结
摘要:自己总结的博客 optparse模块解析命令行参数的说明及优化 使用optparse模块根据不同的参数创建不同的csv文件 涉及到的flask服务 from flask import Flask app = Flask(__name__) @app.route("/hello_world") def 阅读全文
posted @ 2022-04-11 15:47 江湖乄夜雨 阅读(255) 评论(0) 推荐(0) 编辑
Golang在函数中修改外部变量
摘要:修改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 江湖乄夜雨 阅读(450) 评论(0) 推荐(0) 编辑
xorm+postgreSQL实现事物与in查询
摘要: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 江湖乄夜雨 阅读(302) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示