Go (also known as Golang) is a statically strongly typed, compiled, concurrent, and garbage-collected programming language developed by Google.
知识进阶
"Go 1.18 Generics Comprehensive Explanation: A Explaining All About Generics"
On March 15, 2022, the controversial but highly anticipated generics was finally released with Go 1.18.
However, because the time span of Go's support for generics is too long, there are many articles with "generics" as the keyword that introduce old generics proposals or designs before Go1.18, and many designs ended up in Go1. 18 was obsolete or changed. And many articles (including official ones) that introduce generics in Go1.18 are too simple, they do not give a complete introduction to generics in Go, and do not let everyone realize how much complexity the introduction of generics in Go has added to the language. (Of course, it may also be that I just didn't find a better article)
For these reasons, I decided to refer to The Go Programming Language Specification and write an article that introduces Go1.18 Generics in a more complete and systematic way, which may be one of the more comprehensive articles about Go Generics.
This article strives to enable people who have not been exposed to generic programming to better understand Go's generics, so the text may be a little long-winded. I believe that after reading this article, you can get a very comprehensive understanding of Go generics.
"Personal experience sharing how to read Go language source code"
What does the Go source code include, view the standard library source code, view the underlying implementation of the Go language
"Go Reader Question: Does Go Function Return Value Naming Make Sense? 》
Actually named return parameters, more Go-style, are to explicitly name the return.
But it will also bring about the possible omission of the return in the function, so that many people who are new to the game can't understand it. Or as described in the article, the named return parameter is written to become a recursive function, and a tremor will also appear.
The Go Design Philosophy: Less is More, Where Did It Come From? 》
When sharing knowledge and experience in the Go community before, I often heard slang words such as: less is more, less is more, the great road is simple, and the great road is always simple.
Even when discussing Go issues and proposals, some people use "less is more" to refute or support the argument, which is very interesting. Everyone will be very curious, where is the source, what does it mean?
Why is Go so hard to use? Do you know these 6 details? 》
When making a new application selection, we will choose the application programming language. At this time, we will struggle with Java, PHP, Go, etc. We will think about whether there is a fatal problem and cannot be used?
It is clear that Go does not have a very fatal problem, otherwise you and I would not meet here, and there would be no fire.
There are quite a few uncomfortable points, and I will take a look at it with you today.
上手实操
"Golang Development Framework Documentation Collection"
Istio, Go-kit, Go-kratos, Go-micro, Go-zero, Goa, gizmo, Dubbo-go, Jupiter, Tars-go
"Go's Efficient Development Routine"
When the company is currently conducting research and development on the Go server, it is found that the best practices for Go development are lacking, resulting in the following phenomena:
1. When developing with Go, you will be more confused, don't know how to start, how to carry out the work more efficiently.
2. Repeatedly making wheels is more serious.
3. The code quality of the project is uneven, resulting in uneven quality of the delivered products.
4. The product runs in a black box, with poor observability, as long as it can run.
5. Code implementation tests the level of R&D personnel, but after all, the top ones are few and often relatively poor, and the top ones may make mistakes.
6. One person is responsible for the entire function development. Once the person leaves, code maintenance will be difficult.
......
"Build your own JA3 fingerprint with Go"
This article will briefly review the https handshake process, and explain what JA3 fingerprints are and how to customize their own JA3 fingerprints with Go. Readers can follow the author's ideas to gradually build their own JA3 fingerprints.
"Take you ten days to easily get the finale of Go microservices (distributed transactions)"
We will show you a go-zero microservice example in detail through a series of articles. The whole series is divided into ten articles. The directory structure is as follows:
1. Environment construction
2. Service split
3. User Services
4. Product service
5. Order service
6. Payment Services
7. RPC service Auth authentication
8. Service monitoring
9. Link Tracking
10. Distributed Transactions (this article)
I hope that through this series, you can quickly develop a mall system using go-zero in the Docker environment on the local machine, so that you can quickly get started with microservices.
面试真题
"Interviewer: Briefly talk about Go escape analysis? 》
Interviewer: "Students who have written C/C++ know that calling the famous malloc and new functions can allocate a piece of memory on the heap. The responsibility for the use and destruction of this piece of memory lies with the programmer. If you are not careful, it will happen. Memory leak. Then tell me how Golang handles this problem"
Fat Tiger: "Golang optimizes and simplifies memory management through escape analysis, and it can determine whether a variable is allocated to the stack."
"Interviewer: Let's talk about function calling conventions in Go language"
This article will talk about the function calling convention of Go language. The calling convention is the convention between the caller and the callee for passing parameters and return values. The calling convention of Go language has been optimized in version 1.17. Let's take a look at the two What is the calling convention of this version?
"Go language slice interview real questions 7 consecutive questions"
1. What is the difference between an array and a slice?
2. Is copying a large slice necessarily more expensive than copying a small slice?
3. Light and dark copies of slices
4. What are zero slices, empty slices, and nil slices
5. Slice expansion strategy
6. What is the difference between parameter passing slice and slice pointer?
7. What should I pay attention to when traversing slices in range?
热门问答
- What Golang channels don't understand
- How to read properties when Golang parameters are interface types
- What does this go code mean?
- Golang's map cannot modify elements?
- Golang prints a struct and the result is an integer?
- Why can't Golang's interface receive int?
- How is the third-party package management mechanism of golang different from that of Python?
- Why is it safe to read and write data from Golang context?
课程推荐
"7 Days to Play GO Language" 本门课程为图文课程
Beginner to proficient in Go language:
It means not only mastering the basic grammar, but also being familiar with the source code of modules. More importantly, you can develop the system independently, and you can apply the idea of go to solve problems at work.
This course is not only an entry-level tutorial for 0 basic people, but also a perfect tutorial for students who already have programming ideas, especially those who are proficient in other back-end languages.
In this course, you will get:
1. A guide for avoiding pits developed by experienced programmers in other programming languages (such as Java, C++, PHP, etc.)
2. Systematically master Go language programming ideas and be able to solve practical problems;
3.2 Project actual combat, understand some basic ideas of coding and some gameplay of the golang community.
PS: What technical content do you want to see, you can leave a message in the comment area~
If you have any questions, you can add Ms. WeChat~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。