From 1cd272d16ae59236ab63f9d8e55db98f3c5b80ee Mon Sep 17 00:00:00 2001
From: Rob Pike syscall
package instead returns an error
for system call errors.
-On Unix, the implementation is done by a
+On Unix, the implementation is done by a
syscall.Errno
type
that satisfies error
and replaces the old os.Errno
.
One of the most sweeping changes in the Go 1 library is therefore a
-complete redesign of the
+complete redesign of the
time
package.
Instead of an integer number of nanoseconds as an int64
,
and a separate *time.Time
type to deal with human
@@ -1107,7 +1107,7 @@ to be implemented in the future.
No changes will be needed.
In Go 1, the binary.TotalSize
function has been replaced by
@@ -1253,7 +1253,7 @@ The go/printer
package supports an a
configuration mode SourcePos
;
if set, the printer will emit //line
comments such that the generated
output contains the original source code position information. The new type
-CommentedNode
can be
+CommentedNode
can be
used to provide comments associated with an arbitrary
ast.Node
(until now only
ast.File
carried comment information).
@@ -1320,7 +1320,7 @@ to run-time errors.
In Go 1, the definition of hash.Hash
includes
-a new method, BlockSize
. This new method is used primarily in the
+a new method, BlockSize
. This new method is used primarily in the
cryptographic libraries.
go
fix
will update almost all code affected by
-In Go 1, the syslog.NewLogger
+In Go 1, the syslog.NewLogger
function returns an error as well as a log.Logger
.
FormatMediaType
function
of the mime
package has been simplified to make it
consistent with
-ParseMediaType
.
+ParseMediaType
.
It now takes "text/html"
rather than "text"
and "html"
.
@@ -1535,9 +1535,9 @@ What little code is affected will be caught by the compiler and must be updated
In Go 1, the various SetTimeout
,
SetReadTimeout
, and SetWriteTimeout
methods
-have been replaced with
+have been replaced with
SetDeadline
,
-SetReadDeadline
, and
+SetReadDeadline
, and
SetWriteDeadline
,
respectively. Rather than taking a timeout value in nanoseconds that
apply to any activity on the connection, the new methods set an
@@ -1808,7 +1808,7 @@ The compiler will catch code using the old interface.
The regexp
package has been rewritten.
-It has the same interface but the specification of the regular expressions
+It has the same interface but the specification of the regular expressions
it supports has changed from the old "egrep" form to that of
RE2.
go
fix
tool wil
+
+The template
and exp/template/html
packages have moved to
+text/template
and
+html/template
.
+More significant, the interface to these packages has been simplified.
+The template language is the same, but the concept of "template set" is gone
+and the functions and methods of the packages have changed accordingly,
+often by elimination.
+
+Instead of sets, a Template
object
+may contain multiple named template definitions,
+in effect constructing
+name spaces for template invocation.
+A template can invoke any other template associated with it, but only those
+templates associated with it.
+The simplest way to associate templates is to parse them together, something
+made easier with the new structure of the packages.
+
+Updating:
+The imports will be updated by fix tool.
+Single-template uses will be otherwise be largely unaffected.
+Code that uses multiple templates in concert will need to be updated by hand.
+The examples in
+the documentation for text/template
can provide guidance.
+
diff --git a/doc/go1.tmpl b/doc/go1.tmpl
index dd72404c33..ae9f81a639 100644
--- a/doc/go1.tmpl
+++ b/doc/go1.tmpl
@@ -797,7 +797,7 @@ This behavior was unpleasant and unportable.
In Go 1, the
syscall
package instead returns an error
for system call errors.
-On Unix, the implementation is done by a
+On Unix, the implementation is done by a
syscall.Errno
type
that satisfies error
and replaces the old os.Errno
.
One of the most sweeping changes in the Go 1 library is therefore a
-complete redesign of the
+complete redesign of the
time
package.
Instead of an integer number of nanoseconds as an int64
,
and a separate *time.Time
type to deal with human
@@ -1011,7 +1011,7 @@ to be implemented in the future.
No changes will be needed.
In Go 1, the binary.TotalSize
function has been replaced by
@@ -1156,7 +1156,7 @@ The go/printer
package supports an a
configuration mode SourcePos
;
if set, the printer will emit //line
comments such that the generated
output contains the original source code position information. The new type
-CommentedNode
can be
+CommentedNode
can be
used to provide comments associated with an arbitrary
ast.Node
(until now only
ast.File
carried comment information).
@@ -1223,7 +1223,7 @@ to run-time errors.
In Go 1, the definition of hash.Hash
includes
-a new method, BlockSize
. This new method is used primarily in the
+a new method, BlockSize
. This new method is used primarily in the
cryptographic libraries.
go
fix
will update almost all code affected by
-In Go 1, the syslog.NewLogger
+In Go 1, the syslog.NewLogger
function returns an error as well as a log.Logger
.
FormatMediaType
function
of the mime
package has been simplified to make it
consistent with
-ParseMediaType
.
+ParseMediaType
.
It now takes "text/html"
rather than "text"
and "html"
.
@@ -1438,9 +1438,9 @@ What little code is affected will be caught by the compiler and must be updated
In Go 1, the various SetTimeout
,
SetReadTimeout
, and SetWriteTimeout
methods
-have been replaced with
+have been replaced with
SetDeadline
,
-SetReadDeadline
, and
+SetReadDeadline
, and
SetWriteDeadline
,
respectively. Rather than taking a timeout value in nanoseconds that
apply to any activity on the connection, the new methods set an
@@ -1693,7 +1693,7 @@ The compiler will catch code using the old interface.
The regexp
package has been rewritten.
-It has the same interface but the specification of the regular expressions
+It has the same interface but the specification of the regular expressions
it supports has changed from the old "egrep" form to that of
RE2.
go
fix
tool wil
+
+The template
and exp/template/html
packages have moved to
+text/template
and
+html/template
.
+More significant, the interface to these packages has been simplified.
+The template language is the same, but the concept of "template set" is gone
+and the functions and methods of the packages have changed accordingly,
+often by elimination.
+
+Instead of sets, a Template
object
+may contain multiple named template definitions,
+in effect constructing
+name spaces for template invocation.
+A template can invoke any other template associated with it, but only those
+templates associated with it.
+The simplest way to associate templates is to parse them together, something
+made easier with the new structure of the packages.
+
+Updating:
+The imports will be updated by fix tool.
+Single-template uses will be otherwise be largely unaffected.
+Code that uses multiple templates in concert will need to be updated by hand.
+The examples in
+the documentation for text/template
can provide guidance.
+
-- 2.50.0