This is my handwritten introduction to Go language. I'll teach you how to get started. Source code + article, you will π₯΄! I put all the code in the article github.com/GanZhiXiong/go_learning In this warehouse! When reading the article, the learning effect is better compared with the code in the warehouse!
What is a one-way channel
A on ...
Posted by nickminute on Mon, 04 Apr 2022 23:10:27 +0300
catalogue
Slice slice
How to create slices
Slice initialization
Create slices with make
Operate slice with append built-in function (slice append)
Exceeds the original slice Cap limit, the underlying array will be reallocated, even if the original array is not full.
Slice copy
Β
Slice traversal
String and slice
Chinese character st ...
Posted by micmac on Mon, 04 Apr 2022 17:24:38 +0300
background
I don't want to continue blogging on the dungpit website, so I Set up a static blog with Vuepress , it works well with github pages and server. But the blogs written before are basically all in CSDN. If you want to export them, it's too tired to copy them one by one manually, so you use go to write a crawler to automatically export t ...
Posted by lobski on Mon, 04 Apr 2022 13:31:45 +0300
This article updates the original address in real time: https://ebitencookbook.vercel.app/docs/CookBook_Start/class1
Lesson 1 installing Ebiten
Welcome to Ebiten Chinese tutorial
Today, we officially began to study the development of Ebiten
Install development environment
You can also refer to the official tutorial (Chinese document): https://e ...
Posted by rishiraj on Mon, 04 Apr 2022 08:11:51 +0300
sync.Cond
preface
What is sync Cond
Look at the source code
Wait
Signal
Broadcast
summary
sync.Cond
preface
This code is based on go version go1 13.15 darwin/amd64
What is sync Cond
Condition variable sync. In Go language standard library Cond, which allows a group of goroutines to be awakened when certain conditions are met.
Each Cond ...
Posted by borabora12 on Mon, 04 Apr 2022 07:14:52 +0300
Write FizzBuzz program
First, write a program for outputting numbers (1 to 100), with the following changes:
If the number can be divided by 3, Fizz is output.If the number can be divided by 5, Buzz is output.If the number can be divided by 3 and 5 at the same time, FizzBuzz is output.If the previous conditions are not met, the number is outp ...
Posted by neville on Sun, 03 Apr 2022 11:06:27 +0300
The title is no offense, but I think this advertisement is very interesting Take the mind map above if you like
catalogue
Basic program structure
The well-known basic program structures are sequence, branch and loop.
The sequence will not be repeated. Next, we will explain the basic common writing and common patterns of branches ...
Posted by zeeshan_haider000 on Sun, 03 Apr 2022 01:24:27 +0300
subject
Give you a binary matrix grid of n x n, and return the length of the shortest unblocked path in the matrix. If no such path exists, - 1 is returned.
The unblocked path in the binary matrix is a path from the upper left cell (i.e., (0,0)) to the lower right cell (i.e., (n - 1, n - 1)), which meets the following requirements at the sa ...
Posted by outatime88 on Sat, 02 Apr 2022 17:05:51 +0300
Cultivation background
I worked overtime day and night to develop the simplest Go Hello world application. Although I just quit after printing, my boss also asked me to go online, the only application I can write.
The project structure is as follows:
.
βββ go.mod
βββ hello.go
hello.go code is as follows:
package main
func main() {
printl ...
Posted by patrickng on Fri, 01 Apr 2022 05:07:34 +0300
Course address go-class-slides/xmas-2020 at trunk Β· matt4biz/go-class-slides (github.com)
Keynote teacher Matt Holiday
00-02-Hello Example
directory structure
L:.
β main.go
β
ββββhello
hello.go
hello_test.go
main.go is the main program entry
hello.go is the Hello module
hello_test.go is used to unit test Hello module
Diffe ...
Posted by andylyon87 on Fri, 01 Apr 2022 03:32:04 +0300