Go 1.5 released

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



    In this version, many major changes have been made to the language implementation. The compiler and runtime was broadcast from C to Go , removing the last remnants of C from the Go code base. The garbage collector has been completely rewritten , which reduced pauses during garbage collection by orders of magnitude . The accompanying changes in the runtime scheduler allowed us to change the value of GOMAXPROCS (the number of simultaneously running goroutines) from 1 to the number of logical CPUs. Changes in the linker allowed the distribution of 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 of the Go blog by 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 vending will be a step forward in standardizing the way external dependency management is implemented in Go. The new “go tool trace” utility allows you to visualize the progress of the program in the smallest details right at runtime. The new “go doc” provides a more convenient command line interface for viewing Go documentation.

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

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

    The only change in the language (backward compatible, of course) is to reduce the restrictions on literals for map , this 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 displays the output of a usage message much more beautifully . In the math / big package, the Float type has been added for working with large floating-point numbers of arbitrary precision. The improvement in the DNS resolver for Linux and BSD systems allowed us to get rid of CGO for programs that needed DNS. The go / types package has moved to the standard library from the golang.org/x/tools repository. (The go / constant and go / importer packages moved similarly). ArrayOf and FuncOf functions were added to the reflect package , similar to the existing oneSliceOf . And, of course, a whole list of minor fixes and improvements .

    You can find all the details and release details on the release page . You can 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 a .tar.gz archive with binaries, or source codes - 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), then the easiest way is to download the binary .tar.gz packages and unpack them into (standard) / usr / local:
    $ ls /usr/local/go*
    go142
    go15
    

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


    References


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

    Also popular now: