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...


Use derekparker/delve to debug Go program

... Use derekparker/delve Debug Go program Install delve Debugging tool by go get Download source go get -u github.com/derekparker/delve/cmd/dlv Install dlv-cert The certificate has gencert.sh script under derekparker/delve/scripts , execute it to generate the certificate. A user password...


How to write and deploy a Go program in Google Cloud

... How to write and deploy Go program Google Cloud App Engine in Google Cloud, in addition to writing programs in Python, Java, PHP, you can also use Go language Here, I teach you how to get started. But we don't need App Engine to deploy, instead use Container Engine (still in Beta)....


Golang's method set inheritance rule example

... This article shows the inheritance rules of the method set in the Golang mechanism through concrete examples. 0x00 Simple method rules First, we declare the basic operational structure of the example. Go type Cat struct{ Name string Color string } 1 2 3 4 type Cat struct { Name string...


Golang basic learning - string and integer conversion

... The conversion between strings and integers in the golang language is a bit more complicated than PHP. People who have just studied, especially have learned PHP, can do things in the second level, here to use strcov package function conversion, orz~~~~. There is no way to enter the door...


How far are you from the 100,000 lines of code? (Program implementation)

... 前言 Since the ancient programming world, there is such a legend, 100,000 lines of code piled up a program, so many of us are struggling on the way to knock code, then what are we? How far is it from the 100,000 lines of code?! The inspiration for this program comes from this. We will use...


Go Language Learning Lesson 8 - Structures and Packages (Object-Orientation of Go)

... Next, let's talk about object-oriented programming in Go. Objecting in Go is quite different from other object-oriented languages. First of all, there is no inheritance and polymorphism in the Go language, and there is no constructor. And Go language does not use class to implement the...


Golang creates the simplest HTTP and HTTPS services

... Golang can implement HTTP and HTTPS services with very short code HTTP服务 HTTP is based on the transport layer TCP protocol. package main import ( "net/http" "fmt" "log" ) func main() { http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request){ fmt.Fprint(w, "Hello world") }) log...