Go1.5 Improvement Summary

Source: Internet
Author: User
Tags googleplex
This is a creation in Article, where the information may have evolved or changed.

Go1.5 Introduction to Improvement

1. Pure Go (+ few compilations) implement runtime and compiler

2. Improve the garbage collector, support concurrency (one indicator seems to be paused within 10 milliseconds).

3. gomaxprocs Default value to CPU core number

4. Internal restriction rules are extended to third party packages (previously only STD packages enabled)

5. Increase vendor support, basic solution to third-party library dependency issues and version issues

6. Add Trace command, more friendly profiling program running state

7. Add Go Doc command


Grammatical changes

Increase the map literal. Previous code:

M: =map[point]string{  point{29.935523, 52.891566}:   "Persepolis",    point{-25.352594, 131.034361}: "Uluru ",  point{37.422455, -122.084306}:" Googleplex ",}

Now you don't have to write every one. Point the following:

M: =map[point]string{    {29.935523, 52.891566}:   "Persepolis",    { -25.352594, 131.034361}: "Uluru",    {37.422455, -122.084306}: "Googleplex",}


Tool changes

The previous commands, such as 6G/8G, were merged into one: Go tool compile,
The assembler and the connector are also merged into one: Go tool asm, go tool link.
The target file is used uniformly. O is the suffix.

Cross-platform compilation is simpler:

$ exportgoos=darwin goarch=amd64$ Go tool compile program.go$ go tool link PROGRAM.O

in addition, Vet and the cover has stabilized and moved to the core repository.

Go Build increased the -buildmode parameters (Windows is not yet supported),
You can generate a dynamic library and a static library for use with C/+ + (will someone write extensions for languages like Python/ruby with Go?).

CGO section, Windows finally supports external links, that is, the link C + + library can be statically compiled.
At the same time, a ${srcdir} parameter was added to resolve the problem that the current directory change in link caused the . A file not found.


Standard library Section

Http://tip.golang.org/doc/go1.5#library


Thanks to the author: chai2010

View Original: Go1.5 Improvement summary


About Us:

Code number:codemanship

Introduction: "Code Surgery" is committed to exploring the world of the program, improve code quality. Join the "code" to explore 01 worlds together. Currently, "code" is focusing on Golang language.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.