Loading...
Golangkardianos/service - 将golang程序作为服务运行survey - 用于构建交互式和可访问的提示,并完全支持windows和posix终端。Windows Shellhttps://github.com/lukesampson/psutils - powershell 实用脚本(常用:sudo.ps1)
package main import ( "fmt" "syscall" "time" "unsafe" ) const ( MB_OK = 0x00000000 MB_OKCANCEL = 0x00000001...
未完成构建模式是在go build打包二进制的时候指定的打包模式,通过go help buildmode查看支持的打包模式$ go version go version go1.18.1 linux/amd64 $ go help buildmode The 'go build' and 'go install' commands take a -buildmode argument ...
0x00这次golang正式更新了泛型(之前的1.17 和1.18 Beta 1 中的只是测试版,其中有一些用法和正式版有较大的差别),是一次重大的更新,原以为在GO2.0的时候更新。0x01 类型形参(Type Parameters)在之前想要实现一些通用的功能还是比较麻烦的,而且代码冗余。比如实现gorm添加json类型字段:type Table struct { AField ...
0x00 时间格式化相信都听说过Golang时间格式化规则layout2006-01-02 15:04:05 是Golang创始纪念日,以前我也是这样认为,还觉得golang太傲慢了(笑)。直到后面仔细观察后发现layout中年、月、日、时、分、秒的数字才发现事情没有那么简单,首先来观察这几组layout:2006-01-02 15:04:05 // 24小时格式 有0占位 2006-1...