golang shell color
import ( "fmt" "github.com/fatih/co… 继续阅读 golang shell color
import ( "fmt" "github.com/fatih/co… 继续阅读 golang shell color
func main() { c := make(chan os.Signal, 1) signal.… 继续阅读 golang os.Signal跳出循环
func isIp(address string) bool { ip := net.ParseIP… 继续阅读 golang 判断ip地址合法性
https://dl.google.com/go/go1.19beta1.linux-amd64.t… 继续阅读 golang 1.19 beta1 download
FROM golang:alpine AS builder WORKDIR /go/pj COPY … 继续阅读 golang multi stage Dockerfile
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