golang multi stage Dockerfile
FROM golang:alpine AS builder WORKDIR /go/pj COPY … 继续阅读 golang multi stage Dockerfile
FROM golang:alpine AS builder WORKDIR /go/pj COPY … 继续阅读 golang multi stage Dockerfile
#https://go.dev/dl/ mv /usr/local/go /usr/local/go… 继续阅读 GOLANG 1.18.3 INSTALL
func TrimSpace(str string) string { var strSlice [… 继续阅读 golang去掉字符串中的空格
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ld… 继续阅读 golang build without options output
func SUM(nums …any) any { switch nums[0].(type) … 继续阅读 golang any转换为其他类型
func DeepCopy(dst, src any) error { var buf bytes.… 继续阅读 deepcopy for golang
func checkAlive(ip string, port int) bool { isAliv… 继续阅读 golang net.DialTimeout
import ( “fmt” _ “go.uber.org/automaxprocs” “runti… 继续阅读 golang use uber automaxprocs
FROM golang:1.17-alpine3.13 as builder RUN mkdir /… 继续阅读 golang multi stage build Dockerfile
go build -buildmode=plugin -o plugin1.so plugin1.g… 继续阅读 golang compile to plugin mode
func Md5File(filePath string) (string, error) { va… 继续阅读 golang get file md5
func TestMapEqu(t *testing.T) { m1 := map[string]a… 继续阅读 golang reflect.DeepEqual 比较map对象
package util import ( “net” ) func GetIPByDomain(d… 继续阅读 golang 通过域名拿ip
client := &http.Client{ Transport: &http.T… 继续阅读 golang http client不使用连接池
import ( “encoding/base64” “io/ioutil” “log” ) fun… 继续阅读 golang 图片转base64
func NginxReload() { switch viper.GetString(“serve… 继续阅读 golang switch case 一分支多值
func SendTelegram(msg string) { //生成要访问的url botid … 继续阅读 golang telegram send msg
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使用复杂字符串命令