The Go programming language released version 1.18 on Tuesday. See what’s new and how to install in Ubuntu / Debian Linux.
Go 1.18 is a massive release that introduced the most requested Generics support. The Go team encouraged users to get to know this new feature using the official tutorial.
Also, this release has fully integrated Fuzzing into its standard tool-chain. User may get started with this new feature via this tutorial.
Other changes in Go 1.18 include:
- Go workspace mode.
- 20% performance improvements for Apple M1, ARM64, and PowerPC64.
- The syntax for function and type declarations now accepts type parameters.
- Parameterized functions and types can be instantiated by following them with a list of type arguments in square brackets.
- The new token ~ has been added to the set of operators and punctuation.
- The syntax for Interface types now permits the embedding of arbitrary types (not just type names of interfaces) as well as union and ~T type elements. Such interfaces may only be used as type constraints. An interface now defines a set of types as well as a set of methods.
- The new predeclared identifier any is an alias for the empty interface. It may be used instead of interface{}.
- The new predeclared identifier comparable is an interface that denotes the set of all types which can be compared using == or !=. It may only be used as (or embedded in) a type constraint.
Download & Install Go in Linux:
The Go programming language provides official packages for Windows, Linux, and Apple macOS. User may download the package from the link button below:
And, Ubuntu, Debian and Linux Mint based systems may follow this guide to install & setup Go 1.18.