The difference between arrays and slices in golang is related to the difference between arrays and slices in

... golang: , the pointer type when slicing, the array is the value type The length of the array is fixed, and the slice is not (slice Is a dynamic array) slices more than an array of attributes: capacity (cap) The bottom of the slice is the array Since one is a pointer type, one is a value...


A deadlock-inspired thinking

... The author used Grpc's library after going to golang. The client that wrote the tcp this time, due to the client's write blocking, indirectly caused the code deadlock, recorded here. client write Category Write success "Write success" means that the n returned by the write call is equal...


Use the orm package operation database in Beego

... * to use the orm package operation database in Beego /1, Models settings package models Import ( "github.com/astaxie/beego/orm" _ "github.com/go-sql-driver/mysql" ) Type User struct { Id int Name string Pwd string } Func init(){ / / Set the database basic information orm...


Teach you to use go freetype to generate avatars based on user nicknames

... Recently, you need to add some new features to the user service, including the ability to generate avatars based on user nicknames during registration. Since the user service is written in golang, google to google only find freetype a relatively easy to use library, other apis such as...


Teach you to use go freetype to generate avatars based on user nicknames

... Recently, you need to add some new features to the user service, including the ability to generate avatars based on user nicknames during registration. Since the user service is written in golang, google to google only find freetype a relatively easy to use library, other apis such as...


Teach you to use go freetype to generate avatars based on user nicknames

... Recently, you need to add some new features to the user service, including the ability to generate avatars based on user nicknames during registration. Since the user service is written in golang, google to google only find freetype a relatively easy to use library, other apis such as...


Ubuntu 16.04 go language development environment to build and helloworld run

... download and install golang 乌班图, then download and install golang process is relatively easy. Use the following command: sudo apt-get install golang Run the above command to enter the user password. Then wait for the installation to complete. can use the following command to determine...


The first section How to use Go to achieve a single-chain list

... 一, concept introduction Below this picture is our single-chain watch coal fleet. Each section of the coal truck is an element in a single-chain watch. The coal in each car is the data stored in the element. The front and rear cars are connected by chains, as a single-chain watch coal...


1. Getting to know Golang

... with active learning is better than cramming. What is your question about the Go language for the first time? 我问题列表 1.Go What is the background of the language? 2. What kind of problem can Go solve? 3. Why use Go? 4. What is the advantage of Go language compared to other languages? What...


[Gonote: 01] Start my first Go program (Build & Debug) with vscode

... [GoNote: 01] Start my first Go program (Build & Debug) with @s @ @@ Several times when I want to solve the problem through the vcode to write the Go program, I will encounter some setting problems. This time I just met Go 1.11 new experiment (GO111MODULE). After a few simple...