From 178d8d4f7ad1907cd9c0245b2ee4eacd5ae907df Mon Sep 17 00:00:00 2001
From: Rob Pike
-In Go 1, integer division by a constant zero produced a runtime panic: +In Go 1, integer division by a constant zero produced a run-time panic:
@@ -214,7 +214,17 @@ package code.google.com/p/foo/quxx: cannot download, $GOPATH must not be set to
-TODO: go test uses -c with a profile flag.
+The go test
command no longer deletes the binary when run with profiling enabled,
+to make it easier to analyze the profile.
+The implementation sets the -c
flag automatically, so after running,
+
+$ go test -cpuprofile cpuprof.out mypackage ++ +
+the file mypackage.test
will be left in the directory where go test
was run.
crypto/hmac
package has a new f
Equal
, to compare two MACs.
-crypto/x509
: DecryptPEMBlock, EncryptPEMBlock etc.
+crypto/x509
package
+now supports PEM blocks (see
+DecryptPEMBlock
for instance),
+and a new function
+ParseECPrivateKey
to parse elliptic curve private keys.
database/sql/driver
: Queryer
+database/sql/
package
+has a new
+Ping
+method for its
+DB
+type that tests the health of the connection.
database/sql
: Ping, SetMaxIdleConns
+database/sql/driver
package
+has a new
+Queryer
+interface that a
+Conn
+may implement to improve performance.
encoding/json
: Decoder.Buffered, UseNumber, Number
+encoding/json
package's
+Decoder
+has a new method
+Reader
+to provide access to the remaining data in its buffer,
+as well as a new method
+UseNumber
+to unmarshal a value into the new type
+Number
,
+a string, rather than a float64.
encoding/xml
: EscapeText Encoder.Indent
+endoding/xml
package
+has a new function,
+EscapeText
,
+which writes escaped XML output,
+and a method on
+Encoder
,
+Indent
,
+to specify indented output.
godoc
command can filter or present according to the value of the -notes
flag.
go/format
: Node, Source
+go/format
, provides
+a convenient way for a program to access the formatting capabilities of gofmt
.
+It has two functions,
+Node
to format a Go parser
+Node
,
+and
+Source
+to format arbitrary Go source code.
SetFloat64
.
mime/multipart
: Writer.SetBoundary
+mime/multipart
package
+has a new method for its
+Writer
,
+SetBoundary
,
+to define the boundary separator used to package the output.
net/smtp
: Client.Hello
net/textproto
: TrimBytes, TrimString
+net/textproto
package
+has two new functions,
+TrimBytes
and
+TrimString
,
+which do ASCII-only trimming of leading and trailing spaces.
net
: DialOption, DialOpt, ListenUnixgram, LookupNS, IPConn.ReadMsgIP, IPConn.WriteMsgIP, UDPConn.ReadMsgUDP, UDPConn.WriteMsgUDP, UnixConn.CloseRead, UnixConn.CloseWrite
os.FileMode.IsRegular
makes it easy to ask if a file is a plain file.
-pkg/image
: new subsamplings
+image/jpeg
package now
+reads progressive JPEG files and handles a few more subsampling configurations.
runtime/debug
: FreeOSMemory, ReadGCStats, SetGCPercent
+runtime/debug
package
+has three new functions regarding memory usage.
+The FreeOSMemory
+function triggers a run of the garbage collector and then attempts to return unused
+memory to the operating system;
+the ReadGCStats
+function retrieves statistics about the collector; and
+SetGCPercent
+provides a programmatic way to control how often the collector runs,
+including disabling it altogether.