原创 [轉]GIN框架中間件 C.NEXT() C.ABORT() C.SET() C.GET 跨中間件取值 GIN中間件中使用GOROUTINE

    ------------- 1. C.NEXT()演示 //HandlerFunc func indexHandler(c *gin.Context) { fmt.Println("index") c.JSON(http.St

原创 [轉]使用 Android 運行 Golang 程序

  原文:https://www.cnblogs.com/togettoyou/p/goandroidshell.html ubuntu上:   CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=7 go

原创 golang benchmark 測試

    main.go package main import ( // "sync" ) //// A dummy struct //type Person struct { // Name string //} // ////

原创 golange benchmark運行

原文:https://blog.csdn.net/qq_34796981/article/details/107964779 -------------------------- 格式文件名必須以_test結尾。方法名必須已Benchmar

原创 Go: The Idea Behind Sync.Pool

  原文:https://medium.com/swlh/go-the-idea-behind-sync-pool-32da5089df72 -----------------------   I encountered a probl

原创 trade-off 魚和熊掌不可兼得,權衡的意思

原文:https://www.jianshu.com/p/f0fac45738e6 ------------------ 1. 認識這個詞(基礎篇) 詞:trade-off 英英釋義:a balance between two oppo

原创 golang sync.pool

    這個例子,理解一下   package main import ( "fmt" "sync" "time" ) // Pool for our struct A var pool *sync.Pool // A dum

原创 sync.Pool is much slower than using channel, so why should we use sync.Pool?

  package client import ( "runtime" "sync" "testing" ) type MPool chan interface{} type A struct {

原创 【轉】go.mod 文件中的indirect準確含義

  原文:https://my.oschina.net/renhc/blog/3162751 -------------------------   在使用 Go module 過程中,隨着引入的依賴增多,也許你會發現go.mod文件中部分

原创 [轉]Go 中 io 包的使用方法

  原文:https://segmentfault.com/a/1190000015591319   --------------------------- 前言 在 Go 中,輸入和輸出操作是使用原語實現的,這些原語將數據模擬成可讀的或可

原创 【轉】用golang程序跑滿cpu

原文: https://www.jianshu.com/p/f453a271179a -------------------------   用golang程序跑滿cpu   test.go package main func

原创 [轉]prometheus alertamanager中route配置解讀

  原文:https://www.cnblogs.com/L-O-N/p/14024174.html --------------------     想好好理解下alertamanager中route的規則解讀,趁着這個機會,就直接拿着

原创 [轉]學習使用windows下類似iptables的防火牆軟件

    原文: https://www.cnblogs.com/seasonzone/p/3531795.html ------------------- 項目地址:http://wipfw.sourceforge.net一、下載地址:h

原创 【轉】深入理解Golang之http server

  原文:https://juejin.cn/post/6844903998869209095?utm_campaign=studygolang.com&utm_medium=studygolang.com&utm_source=study

原创 【轉】golang實現簡易的分佈式系統方法

轉, 原文:https://www.jb51.net/article/148425.htm       -------- 本文介紹了golang實現簡易的分佈式系統方法,分享給大家,具體如下: 功能 能夠發送/接收請求和響應 能夠連接到