Go Basics
Go language introduction
The difference between interpretive language and compiled language.
Go language is a compiled language.
Go language features (with garbage collection, naturally supporting concurrency)
Concise grammarHigh development efficiencyGood execution performance
Go dependency management
Why dependency management
In the ...
Posted by netmastan on Wed, 05 Jan 2022 00:53:45 +0100
Gin security chapter-2: fast implementation of server-side JWT verification
introduceThis article describes how to rk-boot Implement the server JWT verification logic.What is JWT?JSON network token is an Internet standard used to create data with optional signature or optional encryption so that claims can be safely represented between two parties. The token is signed with a private secret or public / private key.In sh ...
Posted by GameYin on Tue, 04 Jan 2022 21:43:37 +0100
Go processes data efficiently through streaming API s such as Map/Filter/ForEach
What is stream processing
If you have Java experience, you will be full of praise for java8 Stream, which greatly improves your ability to process collection type data.
int sum = widgets.stream()
.filter(w -> w.getColor() == RED)
.mapToInt(w -> w.getWeight())
.sum();
Stream enables us to support ...
Posted by aftab_jii on Tue, 04 Jan 2022 18:29:12 +0100
Software experiment course of Shandong University - Ebiten - source code analysis of 2D game library based on go language - learn the window drawing file window in Ebiten go 2021SC@SDUSC
2021SC@SDUSC
catalogue
1, WindowSize() function
2, SetWindowSize() function
3, WindowSizeLimits() function
4, IsWindowFloating() function
5, SetWindowFloating() function
6, Maximize window() function
7, SetWindowClosingHandled() function
1, WindowSize() function
The code is as follows:
func WindowSize() (int, int) {
if w := uiDri ...
Posted by reeferd on Tue, 04 Jan 2022 13:38:47 +0100
[Go quality assurance: Unit Test & benchmark test]
The current project development can never be completed by one person and requires multi person cooperation. In the process of multi person cooperation, how to ensure the quality of code and how to optimize the performance of code, let's take a look at unit testing and benchmarking.
unit testing
After the function is developed, if the code is ...
Posted by murali on Tue, 04 Jan 2022 06:00:33 +0100
Go processes data efficiently through streaming API s such as Map/Filter/ForEach
What is stream processing
If you have Java experience, you will be full of praise for java8 Stream, which greatly improves your ability to process collection type data.
int sum = widgets.stream()
.filter(w -> w.getColor() == RED)
.mapToInt(w -> w.getWeight())
.sum();
Stream enables us to support ...
Posted by Joopy on Tue, 04 Jan 2022 05:38:27 +0100
[seven day introduction to Go language] program structure & & data type | calf knife test the next day
1. Program structure
1.1 name
If an entity name is declared in a function, it is only valid locally in the function. If declared outside the function, it will be visible to all source files in the package.
The case of the first letter of an entity determines whether its visibility spans packages. If the name starts with a capital lette ...
Posted by allenmak on Tue, 04 Jan 2022 04:23:15 +0100
Why migrate dig to wire
Beginning
Both dig and wire are injection-dependent tools for Go, so why switch from dig to wire when the framework is essentially similar in functionality?
scene
Let's start with the scene.
Suppose our project hierarchy is router->controller->service->dao.
It's probably like this:
Now we need to expose an interface to an order serv ...
Posted by billy2shoe on Mon, 03 Jan 2022 21:27:08 +0100
A simple for cycle will also step on the pit
prefaceWhen a business is implemented recently, the data needs to be read and then processed asynchronously; Naturally, it is relatively simple to implement in Go. The pseudo code is as follows: list := []*Demo{{"a"}, {"b"}}
for _, v := range list {
go func() {
fmt.Println("name="+v.Name)
}()
}
ty ...
Posted by The_Black_Knight on Mon, 03 Jan 2022 12:22:19 +0100
Fully understand the Channel of Go language
channel overviewHello, everyone! We meet again. In this article, we understand the channel and the underlying implementation of channel in Go language and some common interview questions.channel is the first class type built in Go language, and it is also one of the distinctive features of Go language. Let's take a look at an application scenar ...
Posted by domino1 on Mon, 03 Jan 2022 11:24:38 +0100