Go
Let's Learn Go -- (5) Goroutine and Channel
· β˜• 7 min read
1. The Concurrency Model in Go 1.1 The Communication Model: CSP CSP stands for Communicating Sequential Process, a model for concurrent communication. A Process can use many Channels, and a Channel does not care who is using it β€” it is only responsible for sending and receiving data. In the Go community there is a very famous maxim: do not communicate by sharing memory; instead, share memory by communicating.

What Is Functional Programming
· β˜• 2 min read
1. What a Programming Paradigm Is A programming paradigm is a class of typical programming conventions. On one hand, it provides engineers with a way to model entities, linking the physical world to code; on the other hand, it provides engineers with a way of thinking about code and programs.

Currying and Partial Functions
· β˜• 3 min read
1. What Currying Is According to the Wikipedia entry, in computer science currying is the technique of converting a function that takes multiple arguments into a function that takes a single argument (the first argument of the original function), and returns a new function that accepts the remaining arguments and returns a result.

Incomplete Data When Using Base64 to Decode JWT Playload
· β˜• 2 min read
When Base64-decoding a JWT, I found that the JSON data was incomplete. This article mainly introduces the relevant knowledge and solves this problem. 1. Introduction to JWT JWT passes authentication by setting Authorization: Bearer <token> in the Header. A JWT Token is a Base64-encoded string joined by dots, something like

VS Code Cannot Download the Go Plugin Toolchain
· β˜• 1 min read
After installing the Go plugin in VS Code, when you open a Go project the editor prompts you to install the toolchain. But golang.org is not directly accessible, so we need to download the packages manually into the GOPATH directory and install them there. Create the package directory 1 2 cd $GOPATH mkdir -p src/golang.