golang交叉编译
SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=amd64 … 继续阅读 golang交叉编译
SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=amd64 … 继续阅读 golang交叉编译
telegram: func SendTelegram(msg string) { if !vipe… 继续阅读 golang telegram notice
func CMDTrick(cmd string) (string, error) { out, e… 继续阅读 golang exec.Command使用复杂字符串命令
func TestStringSlice(t *testing.T) { words := “tes… 继续阅读 golang 按空格分割的字符串转slice
start := time.Now() resp, err := client.Get(url) e… 继续阅读 golang 统计代码执行时间
acme: env: prod certpath: cert email: – “test1@tes… 继续阅读 golang viper GetStringSlice in yaml
import ( “fmt” “net/smtp” ) const ( SMTP_MAIL_HOST… 继续阅读 golang SMTP mail
usage: func main() { f, _ := os.OpenFile(“cpu.ppro… 继续阅读 golang use pprof tool
#https://go.dev/dl/ mv /usr/local/go /usr/local/go… 继续阅读 golang 1.18 install
bigger := a.Cmp(b) if bigger == 1 { // 1 a is bigg… 继续阅读 golang big.Int 比较大小
//时间比对 本次循环为60s now := time.Now() time0900 := time… 继续阅读 golang 时间比较
func TestTime(tt *testing.T) { timeNow := time.Now… 继续阅读 golang获取昨天日期
https://playground.flamegraph.com/playground
//1.18以前 func TestMyCut(tt *testing.T) { url := “1… 继续阅读 golang 1.18 字符串截取 strings.Cut
func SetHttpProxy() (httpclient http.Client) { Pro… 继续阅读 golang http client 配置连接池
import ( “fmt” “github.com/miguelmota/go-ethereum-… 继续阅读 golang 创建bip39地址
bigint转字符串 bigint := big.NewInt(123) bigstr := big… 继续阅读 golang bigint 字符串 互转
start_time_int64 := int64(res.StartTime) //时间戳int转… 继续阅读 golang时间戳转字符串 字符串转time.Time
import “strconv” num64, err := strconv.ParseInt(“1… 继续阅读 golang 字符串转int64数字
https://mholt.github.io/json-to-go/