golang get key from value
// MapKey 知道值 拿第一个key func MapKey(m map[string]str… 继续阅读 golang get key from value
// MapKey 知道值 拿第一个key func MapKey(m map[string]str… 继续阅读 golang get key from value
func RandMapKey(m map[string]string) string { mapK… 继续阅读 golang map get random value
func HTTPGet(url string) []byte { method := "… 继续阅读 golang http get
func CMDBool(name string, arg []string) bool { cmd… 继续阅读 golang exec Command
func handleTencent(w http.ResponseWriter, r *http.… 继续阅读 golang http handle ignore /favicon.ico
func TestGetFileInfo(tt *testing.T) { info, err :=… 继续阅读 golang os.Stat get file info
func GetRealIP(r *http.Request) (string, error) { … 继续阅读 golang获取请求ip
#运行当前目录及所有子目录下的测试用例 go test ./… #运行指定目录及所有子目录下的测… 继续阅读 golang test测试范围
func TestRuneType(tt *testing.T) { var str = "… 继续阅读 golang rune type
#reuntime/debug #GOGC可以通过GOGC环境变量(所有Go语言程序都能识别)或者r… 继续阅读 golang setup gogc
if find := strings.Contains(dp.String(), "/sn… 继续阅读 golang 字符串包含
go tool compile -S main.go
db, err := sql.Open("godror", `user=&quo… 继续阅读 golang godror use oracle cloud database
func FuzzConv(f *testing.F) { f.Fuzz(func(t *testi… 继续阅读 golang 1.18 Fuzz Test
删除go.sum 删除go.mod中老依赖行 go mod tidy刷新
// 读取配置文件信息 config := new(ConfigInfo) cfg, err := … 继续阅读 golang get struct from json file
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