22 2021-12 GO go 生成pdf //创建目录 tmpDir := strconv.FormatInt(time.Now().Unix(), 10) tmpPath := env.DataDir() + "/help/" + tmpDir + "/" _, err := os.Stat(tmpPath) if err != nil { ... 阅读全文 2021年12月22日 10:55:08 周三 2021-12-22 周三 18 0 0
22 2021-12 GO golang-mysql时间转化 定义一个type,在结构体直接使用TimeFormat类型,数据库datetime查询结果就可以直接封装成年月日 type TimeFormat time.Time func (t TimeFormat) MarshalJSON() ([]byte, e... 阅读全文 2021年12月22日 10:44:56 周三 2021-12-22 周三 18 0 0
02 2021-12 GO Go语言中*和&的区别 & 是取地址符号 , 即取得某个变量的地址 , 如 ; &a *可以表示一个变量是指针类型,也可以表示指针类型变量所指向的存储单元,也就是这个地址所指向的值。 type Person... 阅读全文 2021年12月02日 15:37:04 周四 2021-12-02 周四 18 0 0
26 2021-11 GO go基本操作 基本类型 类型转换 字符串处理 来源:https://segmentfault.com/a/1190000019439223 空 排序 空值判断 字符串 "" 一般是判断一个string字符串是否为空 // 例子: var test... 阅读全文 2021年11月26日 14:42:55 周五 2021-11-26 周五 24 0 0
25 2021-11 GO go 语言 Go语言文件的写入、追加、读取、复制操作: http://c.biancheng.net/view/5729.html Golang简单写文件操作的四种方法: https://studygolang.com/articles/2073 Golang结构体与JSON相互转换时的小技巧 ... 阅读全文 2021年11月25日 18:49:00 周四 2021-11-25 周四 19 0 0