preface

On January 31, 2022, Jeremy Faller and Steve Francia of the official Go team published a new post on the official Go blog, announcing the official Go 1.18 Beta 2 release.

At the same time, the official release supporting the Go generics has been pushed back from the original plan of February 2022 to March 2022.

I have made a translation of the official text for readers.

At the end of this article, the Chinese translation of the official Go generics tutorial is attached, as well as the design ideas and best practices for Go generics.

The original translation

Google Go team Jeremy Faller and Steve Francia

2022.1.31

The Go 1.18 release will add support for generics, Fuzzing automated testing, and the new Workspace mode, which is exciting for the entire Go community and very encouraging for us as members of the official Go team.

Two months ago, we released Go 1.18 Beta 1, the most downloaded Go Beta ever, with more than twice as many downloads as any previous release. Beta 1 has proven to be very stable and reliable, and in fact we are officially using Go 1.18 Beta 1 on Google’s production environment.

Your feedback on Beta 1 helped us uncover hidden bugs in the Go generics, ensuring a more stable final release.

We’ve already addressed these issues in Go 1.18 Beta 2, and we want everyone to try them out.

The easiest way to install Go 1.18 Beta 2 is to run the following command:

Go install golang.org/dl/[email protected] downloadCopy the code

After executing the above command, you can use go1.18beta2 instead of go.

For more download options, visit go.dev/dl/#go1.18b… .

Since it took us some time to release the second beta of Go 1.18, we now plan to release the Go 1.18 candidate in February and the final Go 1.18 official in March.

In addition, Go language server GoPLS and VS Code’s Go extensions now support Go generics.

To install generic-enabled GoPLS, refer to this document: github.com/golang/tool… .

To configure VS Code’s Go plug-in, refer to this tutorial: github.com/golang/vsco…

As always, if you find any issues, especially with the beta, please submit an issue on GitHub at github.com/golang/go/i…

Afterword.

I have written two easy to understand entry articles for Go generics, one is the Chinese translation of the official English tutorial, the other is the Go generics design ideas and use scenario analysis I organized, suggested that interested can focus on reference.

  • Official tutorial: Get started with Go Generics

  • Go Generic design ideas and best Practices: Read the Go generic design and usage scenarios

In the near future, I will also write a technical sharing article about Go Fuzzing.

Open source address

Making: github.com/jincheng9/g…

Get the latest Go interview questions and technology stack

Personal website: Jincheng9.github. IO /

Zhihu: www.zhihu.com/people/thuc…

References

  • Go. / dev/blog go1.18…

  • Go. / dev/blog fuzz – b…

  • Go.googlesource.com/proposal/+/…