golang http client 使用代理
const ( EnableHttpProxy = true HttpProxyUrl = &quo… 继续阅读 golang http client 使用代理
const ( EnableHttpProxy = true HttpProxyUrl = &quo… 继续阅读 golang http client 使用代理
func If[T any](cond bool, trueValue, falseValue T)… 继续阅读 golang模拟三元运算符
s := “abcdefg” fmt.Println(s[0:6]) //包含起始位置,不包含结束位… 继续阅读 golang字符串截取
nowTime := time.Now() year := time.Now().Year() mo… 继续阅读 golang time.Now()格式化
func main() { router := gin.Default() // 为 multipa… 继续阅读 gin router 限制multipart forms内存
int转成string: string := strconv.Itoa(int) int64转成st… 继续阅读 golang strconv字符串和int互转
timeoutHour := 24 expirationTime := time.Now().Add… 继续阅读 golang time duration usage
src := “hello world” // 标准Base64编码 res1 := base64.… 继续阅读 golang base64 EncodeToString DecodeString
import “encoding/base64” var str = “123456asdfgh” … 继续阅读 golang base64 编码解码
https://go.dev/dl/ https://go.dev/dl/go1.18beta1.l… 继续阅读 golang beta pkg for arm
#golang env export GOROOT=/usr/local/go export GOP… 继续阅读 golang /etc/profile path
GOARM=7 GOARCH=arm64 GOOS=linux go build -v
#https://blog.golang.org/go1.17 mv /usr/local/go /… 继续阅读 golang 1.18beta1 install
date := time.Now().Format(“2006-01-02”) time := ti… 继续阅读 golang date time 格式化
package main import ( “os” “fmt” ) func main(){ fi… 继续阅读 golang判断文件是否存在
package main import “fmt” import “os” func main(){… 继续阅读 golang 获取参数列表
https://dl.google.com/go/go1.18beta1.linux-amd64.t… 继续阅读 golang 1.18 beta1 download
#https://blog.golang.org/go1.17 mv /usr/local/go /… 继续阅读 GOLANG GO1.17.5 INSTALL
git clone https://github.com/golang/website.git cd… 继续阅读 运行golang官网
埋点: package main import ( “fmt” ) var Version stri… 继续阅读 golang编译时传入变量值