github.com/spotify/syslog-redirector-golang@v0.0.0-20140320174030-4859f03d829a/blog/content/go12.article (about)

     1  Go 1.2 is released
     2  1 Dec 2013
     3  Tags: release
     4  
     5  Andrew Gerrand
     6  
     7  * Introduction
     8  
     9  We are pleased to announce the release of Go 1.2, the latest stable version of
    10  the Go Programming Language.
    11  
    12  Binary distributions may be downloaded from the
    13  [[http://golang.org/doc/install][usual place]] or if you prefer to
    14  [[http://golang.org/doc/install/source][compile from source]] you should use
    15  the `release` or `go1.2` tags.
    16  
    17  This new release comes nearly seven months after the release of Go 1.1 in May,
    18  a much shorter period than the 14 months between 1.1 and 1.0.
    19  We anticipate a comparable interval between future major releases.
    20  
    21  [[http://golang.org/doc/go1.2][Go 1.2]] includes a couple of minor
    22  language changes, several improvements to the language implementation and
    23  tools, some performance improvements, and many additions and
    24  (backward-compatible) changes to the standard library.
    25  
    26  Please read the [[http://golang.org/doc/go1.2][release notes]] for all
    27  the details, as some changes may affect the behavior of existing (buggy) programs.
    28  What follows is the highlights of the release.
    29  
    30  A new [[http://golang.org/doc/go1.2#three_index][three-index slice syntax]]
    31  adds the ability to specify capacity as well as length. This allows the
    32  programmer to pass a slice value that can only access a limited portion of the
    33  underlying array, a technique that previously required the use of the unsafe
    34  package.
    35  
    36  A major new feature of the tool chain is the facility to compute and display
    37  [[http://golang.org/doc/go1.2#cover][test coverage results]].
    38  See the [[http://golang.org/cmd/go/#hdr-Description_of_testing_flags][`go`test`]]
    39  and [[http://godoc.org/code.google.com/p/go.tools/cmd/cover/][cover tool]]
    40  documentation for details. Later this week we will publish an article that
    41  discusses this new feature in detail.
    42  
    43  Goroutines are now [[http://golang.org/doc/go1.2#preemption][pre-emptively scheduled]],
    44  in that the scheduler is invoked occasionally upon entry to a function.
    45  This can prevent busy goroutines from starving other goroutines on the same
    46  thread.
    47  
    48  An increase to the default goroutine stack size should improve the
    49  performance of some programs. (The old size had a tendency to introduce
    50  expensive stack-segment switching in performance-critical sections.)
    51  On the other end, new restrictions on
    52  [[http://golang.org/doc/go1.2#stack_size][stack sizes]] and
    53  [[http://golang.org/doc/go1.2#thread_limit][the number of operating system threads]]
    54  should prevent misbehaving programs from consuming all the resources of a
    55  machine. (These limits may be adjusted using new functions in the
    56  [[http://golang.org/pkg/runtime/debug][`runtime/debug` package]].)
    57  
    58  Finally, among the [[http://golang.org/doc/go1.2#library][many changes to the standard library]],
    59  significant changes include
    60  the new [[http://golang.org/doc/go1.2#encoding][`encoding` package]],
    61  [[http://golang.org/doc/go1.2#fmt_indexed_arguments][indexed arguments]] in `Printf` format strings, and
    62  some [[http://golang.org/doc/go1.2#text_template][convenient additions]] to the template packages.
    63  
    64  As part of the release, the [[http://play.golang.org/][Go Playground]] has been
    65  updated to Go 1.2. This also affects services that use the Playground, such as
    66  [[http://tour.golang.org/][the Go Tour]] and this blog.
    67  The update also adds the ability to use threads and the `os`, `net`, and
    68  `unsafe` packages inside the sandbox, making it more like a real Go environment.
    69  
    70  To everyone who helped make this release possible, from the many users who
    71  submitted bug reports to the 116 (!) contributors who committed more than 1600
    72  changes to the core: Your help is invaluable to the project. Thank you!
    73  
    74  _This_blog_post_is_the_first_of_the_
    75  [[http://blog.gopheracademy.com/day-01-go-1.2][Go Advent Calendar]],
    76  _a_series_of_daily_articles_presented_by_the_
    77  [[http://gopheracademy.com/][Gopher Academy]] _from_December_1_to_25._