📜 ⬆️ ⬇️

Go 1.5 released

Today, August 19, 2015, the Go project is proud to introduce Go 1.5 - the sixth stable release of the Go language.



In this version there have been many major changes in the implementation of the language. The compiler and runtime was translated from C to Go , removing the last remnants of C from the Go codebase. The garbage collector was completely rewritten , which reduced the pauses during garbage collection by orders of magnitude . The attendant changes in the runtime scheduler allowed us to change the GOMAXPROCS value (the number of simultaneously running gorutins) from 1 to the number of logical CPUs. Changes in the linker allowed to distribute Go packages in the form of dynamic libraries that can be linked with both Go and C programs ( design ).

(the first part is a free translation of the announcement on the Go blog from Andrew Gerrand - blog.golang.org/go1.5 )
')
This release also includes improvements to the Go development tools . Support for "internal" packages allows you to fumble implementation between packages. Experimental support for external dependency rendering will be a step forward in standardizing the way external dependencies are managed in Go. The new tool "go tool trace" allows you to visualize the progress of the program in the smallest detail right during execution. The new “go doc” provides a more convenient command line interface for viewing Go documentation.

Also added several new supported systems and architectures . The most mature of them are darwin / arm and darwin / arm64 (Apple iPhone and iPad) and linux / arm64. Also added is experimental support for ppc64 and ppc64le (IBM 64-bit, bit / little endian).

Support for darwin / arm64 and new dynamic linking functionality is key to the Go mobile project - an experiment for creating Android and IOS applications. (Go mobile itself is not part of this release, it is a separate project).

The only change in the language (backward compatible, of course) is the reduction of restrictions on the literals for the map , which makes them much more readable and convenient in some cases.

The standard library also received a lot of improvements and additions. The flag package now shows the output of a usage message much more beautifully . In the math / big package, the type Float was added to work with large floating point numbers of arbitrary precision. Improvement in the DNS resolver for Linux and BSD-systems allowed to get rid of CGO for programs that needed DNS. The go / types package has been moved to the standard library from the golang.org/x/tools repository. (The go / constant and go / importer packages moved in the same way). The package reflect package added functions ArrayOf and FuncOf , by analogy with the already existing SliceOf . And, of course, a whole list of smaller fixes and improvements .

All details and release details can be found on the release page . Download the release for your system here .

Installation


If you decide to install Go 1.5, then the installation procedure is the same as always - on the official golang.org/dl page , download your installer, or the .tar.gz-archive with binaries, or source files - as you prefer. The first method is preferable.


If you want to leave the previous release (Go 1.4) and be able to switch between the previous and the latest release on the fly (for example, to compare builds for versions), the easiest way is to download binary .tar.gz packages and unpack to (standard) / usr / local:
$ ls /usr/local/go* go142 go15 

and create a symlink on / usr / local / go for the required version. It's easy to wrap in an alias or script, if needed.
 $ cd /usr/local $ ln -nfs go142 go $ ln -nfs go150 go 


Links


golang.org/doc/go1.5
blog.golang.org/go1.5

Source: https://habr.com/ru/post/265115/


All Articles