It is now possible to call srv.Close() to halt an http.Server immediately, or srv.Shutdown(ctx) to stop and gracefully drain the server of connections.
If a web server supports HTTP/2.0, the http.ResponseWriter provided to handlers will also implement the new http.Pusher interface. Handlers can use its functionality to trigger a Server Push for a resource by providing an HTTP method, path, and request headers.
The database/sql package has several major additions that give more control over database queries and allow users to take advantage of additional database features.
Queries take a context.Context that can be used to cancel queries. Native database column types are exposed via sql.ColumnType. Queries can be executed with named parameters if the underlying driver implements support for them.
Plugin support is implemented via the new plugin stdlib package. This will allow Go programs to load additional code—like plugins—while the program is running.
HTTP/2.0 server push via http.Pusher
If a web server supports HTTP/2.0, the http.ResponseWriter provided to handlers will also implement the new http.Pusher interface. Handlers can use its functionality to trigger a Server Push for a resource by providing an HTTP method, path, and request headers.
It’s implemented via new sort.Slice function. This allows any slice to be sorted by providing a comparator callback rather than creating a specialized sort.Interface implementation.
Support for ChaCha20-Poly1305 based cipher suites More flexible config APIs
Yes, finally.
-import "golang.org/x/next/context" +import "context"
Some improvements in runtime:
gc pause (< 1ms) build (15% speedup) defer (10-35% speedup) cgo (45% speedup)
20-30% reduction in binary size 5-35% speedup
$HOME/go on Unix.
Just run go bug and you ill be redirected to a “New Issue” page.