@
1. what is a linked list
Linked list is a non continuous and non sequential storage structure on the physical storage unit. The logical order of data elements is realized through the pointer link order in the linked list.
The linked list is composed of a series of nodes (each element in the linked list is called a node), which can be gen ...
Posted by Strikebf on Tue, 19 Apr 2022 07:24:16 +0300
Official website: ini.unknwon.io/docs
github:https://github.com/go-ini/ini
Ini is a commonly used configuration file format on windows. The Windows version of MySQL uses ini format to store configuration. go-ini It is a third-party library used to operate ini files in Go language.
This article introduces the use of go ini library.
Quick use
...
Posted by spelman07 on Tue, 19 Apr 2022 05:47:20 +0300
Contents of this series of articles
Expand / collapse
Go concurrent programming series (I) Pipe pipeline for multi process programming and process synchronizationGo concurrent programming series (II) Signal semaphores for multi process programming and process synchronizationGo concurrent programming series (3) multi ...
Posted by s2j1j1b0 on Tue, 19 Apr 2022 03:17:40 +0300
It is meaningless for functions to execute concurrently only when data is exchanged between functions. The concurrency model of go language is csp model, which advocates sharing memory instead of sharing memory. Sharing memory is easy to cause competition in different goroutines. In order to ensure the correctness of data exchange, Memory must ...
Posted by Muncey on Mon, 18 Apr 2022 18:21:45 +0300
Contents of this series of articles
Expand / collapse
Go introduction series (I) getting to know go language for the first timeIntroduction to Go series (II) introduction and scope of variables, pointers and data typesIntroduction to Go series (III) basic types - integer, floating point, Boolean and stringGo entry s ...
Posted by Elemen7s on Mon, 18 Apr 2022 18:11:04 +0300
Hand golang basic data structure and algorithm hash table
origin
Recently, I read < < my first algorithm book > > ([Japan] Ishida Baohui; Miyazaki Xiuyi) this series of notes is intended to be practiced by golang
Hashtable
The hash table stores keys( key)Sum value( value)Composed data.
In the hash table, we can use the hash fun ...
Posted by Bladescope on Mon, 18 Apr 2022 06:37:27 +0300
With Kubernetes becoming the de facto standard in the field of container choreography, Golang is more and more used in cloud native. Today, we follow the steps of K8s and learn which classic design patterns are used in K8s.
Create mode
As the name suggests, the creation pattern provides an object creation mechanism, encapsulates the internal ...
Posted by wwfc_barmy_army on Mon, 18 Apr 2022 06:34:22 +0300
defer performance
The release of the official version of go 1.13 has improved the performance of defer, claiming to improve the performance by 30% for defer scenarios.
This release improves performance of most uses of defer by 30%.
Before go 1.13, only the defer statement will be translated into two procedures by the compiler:
1. Callback ...
Posted by suspect on Mon, 18 Apr 2022 00:29:42 +0300
GORM model definition
The ORM framework needs to define the model in advance to operate the database. The model can be understood as a data model as the medium of operating the database.For example:
The data read from the database will be saved to the predefined model object, and then we can get the data we want from the model object.Insertin ...
Posted by bqallover on Sun, 17 Apr 2022 17:20:38 +0300
go variable
introduce
Concept: a variable is equivalent to a data storage space representation in memory.Steps: ① declare variables (define variables); ② Assignment; ③ Use
func main() {
// Defining variables and assignments
var a int = 10
var b int = 12
// Use variables
fmt.Println(a + b)
}
Use details
Variable represents a storage a ...
Posted by Venkatesh on Sat, 16 Apr 2022 10:44:30 +0300