Figure out WaitGroup in Go to understand the core implementation source code of programming language

1. Foundation construction The implementation logic in sync.WaitGroup is quite simple. After reading the previous sync.Mutex and synx.RWMutex, it should be very simple to read them. The only difference is the state1 in sync.WaitGroup 1.1 waiting mechanism sync.WaitGroup is mainly used to wait for a group of goroutines to exit. In essence, ...

Posted by Pawn on Wed, 25 Dec 2019 02:12:43 -0800

Delete the list, would you?

Delete all elements in the single-chain list with a value equal to XXX I inadvertently saw an unusual implementation and found it interesting, so I implemented it myself. The code is really simple and clear, and it runs fast! Okay, now think in your mind, how would you do that?It's so simple. After 5 seconds, you think about a solution, and y ...

Posted by Thierry on Wed, 18 Dec 2019 23:35:13 -0800

kratos micro service framework learning note 1 (kratos demo)

catalog kratos micro service framework learning note 1 (kratos demo) kratos Ontology demo kratos micro service framework learning note 1 (kratos demo) Most of the time this year has passed. It's not much more extensive and github. Now the development task is almost completed, which will be easi ...

Posted by ari_aaron on Wed, 18 Dec 2019 03:43:44 -0800

goweb build service

Introduction to web application Web applications are everywhere in our lives. Take a look at the applications we use every day. They need to It's either a Web application or a variation of a Web application like a mobile App. No matter which programming language, as long as It can develop software that interacts with human beings, and it will c ...

Posted by kiju111 on Sun, 15 Dec 2019 06:27:58 -0800

Go basic learning record - write Web application - Some Thoughts on Routing and program startup

In recent years, I have reconsidered my Web application. First of all, in the main.go file of program startup, there is not too much problem in the temporary route adding. However, according to the previous project development experience, if this system is shared with others, then when making a large project, there will be many routes added, an ...

Posted by TechGnome on Sat, 14 Dec 2019 09:54:08 -0800

The config module of beego source parsing

target The config module refers to the implementation mode, interface and implementation separation in database/sql. In this tutorial, the implementation of ini format configuration is selected and the integration mode of beego and config module is analyzed to achieve the following three goals. Understand the source code implementation of conf ...

Posted by rogair on Fri, 13 Dec 2019 04:10:29 -0800

Blockchain tutorial Fabric1.0 source code analysis rumor algorithm Gossip server 1

In the second half of 2018, the blockchain industry is gradually fading away from the impetuosity and rationality at the beginning of development. On the surface, the demand and value of relevant talents seem to be falling. But in fact, it is the gradual decline of the initial bubble that gives people more attention to the real technology of th ...

Posted by Paavero on Thu, 12 Dec 2019 11:08:03 -0800

Blockchain tutorial Fabric1.0 source code analysis chain code language platform

Chain code and platform of Fabric 1.0 source code Notes 1. Overview of platforms The platforms code is centralized in the core/chaincode/platforms directory. core/chaincode/platforms directory, the programming language platform implementation of chain code, such as golang or java. Platform.go, platform interface definition, and platform related ...

Posted by vaaaska on Thu, 12 Dec 2019 09:20:28 -0800

Bloom filter in Golang

Catalog 1. Concept of bloon filter 2. Application scenario of bloon filter 3. Working principle of bloon filter 4. Advantages and disadvantages of bloon filter 5. Precautions for bloon filter 6. Go to realize bloon filter 1. Concept of bloon filter Bloom filter is a binary ve ...

Posted by jl5501 on Thu, 12 Dec 2019 05:54:50 -0800

Process control of Go language foundation

1. If else (branch structure) 1.1 if judgment basic syntax The format of if condition judgment is as follows: if expression 1{ Branch 1 }else if expression 2{ Branch 2 } else{ Branch 3 } The Go language specifies that the left parenthesis {that matches the if must be placed on the same line as the if and expression, and {that is ...

Posted by shutat on Wed, 11 Dec 2019 00:48:00 -0800