Well, learn GO, so I have this articleBowen is one of the reading notes of GO Language Actual WarMainly related to knowledge
GO functions versus other languagesGO User Defined Types (Structures)Go method
In the evening, you sit under the eaves and watch the day go dark slowly. You feel lonely and sad and deprived of your lif ...
Posted by Ricklord on Thu, 14 Apr 2022 20:06:18 +0300
Our project team uses protobuf as the transmission protocol, and its benefits are needless to say. However, because the default number type of go is int and go belongs to a strongly typed language, switching types has become a common occurrence.
Generally speaking, the steps of switching types are no more than:
Select the number section.
Posted by Spikey on Thu, 14 Apr 2022 17:45:39 +0300
I've seen the seniors use this dynamic routing before, but they haven't paid much attention to it before. Recently, they are building a learning framework. For the first time, I felt the application of the algorithm in writing projects. Before, I thought that the algorithm was used to brush questions, which was rarely used in actual combat. It' ...
Go language introduction series article directory
Introduction to Go language - basic grammarIntroduction to Go language – process statementGetting started with Go – arrays and slicingMap (Goo Goo) 🕊)String (string)functionPointerstructural morphologymethodInterfaceerrorpackageIO operationConcurrentreflex
1.1 what ...
Posted by mydownfall on Thu, 14 Apr 2022 05:09:33 +0300
Application scenario of policy mode
The main purpose of the policy pattern is to separate the behavior from the specific algorithm or implementation. All roads lead to Rome. Taking different routes or travel modes, although there will be different algorithms or implementations, the final behavior is to go to Rome. Its basic implementation ...
Posted by cahamilton on Wed, 13 Apr 2022 03:54:04 +0300
scavenger hunt game
cosmos official waste picker hunting game operation and deployment details / key records, as well as document translation
Official address: The Game | Cosmos SDK Tutorials
The translation part of the document comes from: https://blog.csdn.net/lk2684753/article/details/113849468
1. Install starport
starport is the offi ...
Posted by Ange52 on Tue, 12 Apr 2022 10:21:51 +0300
In the previous section, I learned How to generate automatic Golang CRUD code , this section will learn how to write unit tests for these CRUD operations.
1. Test CreateAccount
From account sql. Start with CreateAccount in go and create a new file account in the db/sqlc directory of the project_ test. go
There is a convention in Golang t ...
Posted by dp777 on Mon, 11 Apr 2022 03:15:49 +0300
encoding/json package of GoLang
Note: This article is based on go SDK V1 on Windows system 8. Explain
json is particularly important in front and back separated development, because it is an important hub for linking the front and back ends json is a syntax for storing and exchanging text information. It is similar ...
Posted by madhu on Sat, 09 Apr 2022 13:44:45 +0300
Getting started with Context
What is Context
Why use context
Basic use of Context
Context interface implementation
1. What is Context
Its main function is to control the life cycle of goroutine.
Context is usually referred to as context, which can be understood as: the running state and site of goroutine.
Posted by Tandem on Fri, 08 Apr 2022 18:22:56 +0300