From 5cff0299931d9f114ca3b3f40aa1e5bb62e2ad08 Mon Sep 17 00:00:00 2001
From: Rob Pike
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-The
This section describes smaller changes, such as those to less commonly
used packages or that affect
-few programs beyond the need to run
Updating:
-Running
Updating
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running go fix
will convert expressions of the form m[k] = ignored,
+Running
go
fix
will convert expressions of the form m[k] = ignored,
false
into delete(m, k)
when it is clear that
the ignored value can be safely discarded from the program and
false
refers to the predefined boolean constant.
@@ -535,7 +535,7 @@ and template
.
go fix
will update all imports and package renames for packages that
+Running go
fix
will update all imports and package renames for packages that
remain inside the standard repository. Programs that import packages
that are no longer in the standard repository will need to be edited
by hand.
@@ -578,7 +578,7 @@ If they are installed, they now reside in $GOROOT/bin/tool
.
Updating:
Code that uses packages in exp
will need to be updated by hand,
or else compiled from an installation that has exp
available.
-The go fix
tool or the compiler will complain about such uses.
+The go
fix
tool or the compiler will complain about such uses.
The package tree old
@@ -603,7 +603,7 @@ The packages in their new locations are:
Updating:
Code that uses packages now in old
will need to be updated by hand,
or else compiled from an installation that has old
available.
-The go fix
tool will warn about such uses.
+The go
fix
tool will warn about such uses.
Deleted packages
@@ -684,7 +684,7 @@ This table lists the old and new import paths:
go fix
will update imports of these packages to use the new import paths.
+Running go
fix
will update imports of these packages to use the new import paths.
Installations that depend on these packages will need to install them using
a go install
command.
os.NewError
.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
Code that defines error types with a String
method will need to be updated
by hand to rename the methods to Error
.
error
and replaces the old os.Errno
.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
Regardless, most code should use the os
package
rather than syscall
and so will be unaffected.
go fix
tool will update many uses of the old time
package to use the new
+The go
fix
tool will update many uses of the old time
package to use the new
types and methods, although it does not replace values such as 1e9
representing nanoseconds per second.
Also, because of type changes in some of the values that arise,
@@ -851,7 +851,7 @@ may have the wrong type or require further analysis.
go fix
.
+few programs beyond the need to run go
fix
.
This category includes packages that are new in Go 1.
go fix
will update calls that assign the error to _.
+Running go
fix
will update calls that assign the error to _.
Calls that aren't fixed will be caught by the compiler and must be updated by hand.
Writer
and Reader
. Package flate
's
go fix
will update old names and calls that assign the error to _.
+Running go
fix
will update old names and calls that assign the error to _.
Calls that aren't fixed will be caught by the compiler and must be updated by hand.
hash.Hash
, such as md5.New
.
go fix
will perform the needed changes.
+Running go
fix
will perform the needed changes.
The crypto/x509 package
@@ -1021,7 +1021,7 @@ of the XML element being marshaled.
go fix
will update most uses of the package except for some calls to
+Running go
fix
will update most uses of the package except for some calls to
Unmarshal
. Special care must be taken with field tags,
since the fix tool will not update them and if not fixed by hand they will
misbehave silently in some cases. For example, the old
@@ -1185,7 +1185,7 @@ The previous behavior can be recreated by adding a nil
argument to
Existing implementations of hash.Hash
will need to add a
BlockSize
method. Hashes that process the input one byte at
a time can implement BlockSize
to return 1.
-Running go fix
will update calls to the Sum
methods of the various
+Running go
fix
will update calls to the Sum
methods of the various
implementations of hash.Hash
.
go fix
will update the few programs that are affected except for
+Running go
fix
will update the few programs that are affected except for
uses of RawURL
, which must be fixed by hand.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
The log/syslog package
@@ -1463,9 +1463,27 @@ Also, the function Wait
is gone; only the method of
the Process
type persists.
+The Waitmsg
type returned by
+Process.Wait
+has been replaced with a more portable
+ProcessState
+type with accessor methods to recover information about the
+process.
+Because of changes to Wait
, the ProcessState
+value always describes an exited process.
+Portability concerns simplified the interface in other ways, but the values returned by the
+ProcessState.Sys
and
+ProcessState.SysUsage
+methods can be type-asserted to underlying system-specific data structures such as
+syscall.WaitStatus
and
+syscall.Rusage
on Unix.
+
Updating:
-All changes will be caught by the compiler and must be updated by hand.
+Running go
fix
will drop a zero argument to Process.Wait
.
+All other changes will be caught by the compiler and must be updated by hand.
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-The
This section describes smaller changes, such as those to less commonly
used packages or that affect
-few programs beyond the need to run
Updating:
-Running
Updating
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running
Updating:
-Running go fix
will update code that uses the old equivalent of the current os.FileInfo
+Running go
fix
will update code that uses the old equivalent of the current os.FileInfo
and os.FileMode
API.
Code that needs system-specific file details will need to be updated by hand.
Code that uses the old POSIX error values from the os
package
@@ -1671,7 +1689,7 @@ have been renamed to runtime.NumCgoCall
and runtime.NumGorout
go fix
will update code for the function renamings.
+Running go
fix
will update code for the function renamings.
Other code will need to be updated by hand.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
§ Atoi
persists but Atoui
and Atof32
do not, so
they may require
-a cast that must be added by hand; the go fix
tool will warn about it.
+a cast that must be added by hand; the go
fix
tool will warn about it.
go fix
will convert expressions of the form m[k] = ignored,
+Running
go
fix
will convert expressions of the form m[k] = ignored,
false
into delete(m, k)
when it is clear that
the ignored value can be safely discarded from the program and
false
refers to the predefined boolean constant.
@@ -459,7 +459,7 @@ and template
.
go fix
will update all imports and package renames for packages that
+Running go
fix
will update all imports and package renames for packages that
remain inside the standard repository. Programs that import packages
that are no longer in the standard repository will need to be edited
by hand.
@@ -502,7 +502,7 @@ If they are installed, they now reside in $GOROOT/bin/tool
.
Updating:
Code that uses packages in exp
will need to be updated by hand,
or else compiled from an installation that has exp
available.
-The go fix
tool or the compiler will complain about such uses.
+The go
fix
tool or the compiler will complain about such uses.
The package tree old
@@ -527,7 +527,7 @@ The packages in their new locations are:
Updating:
Code that uses packages now in old
will need to be updated by hand,
or else compiled from an installation that has old
available.
-The go fix
tool will warn about such uses.
+The go
fix
tool will warn about such uses.
Deleted packages
@@ -608,7 +608,7 @@ This table lists the old and new import paths:
go fix
will update imports of these packages to use the new import paths.
+Running go
fix
will update imports of these packages to use the new import paths.
Installations that depend on these packages will need to install them using
a go install
command.
os.NewError
.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
Code that defines error types with a String
method will need to be updated
by hand to rename the methods to Error
.
error
and replaces the old os.Errno
.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
Regardless, most code should use the os
package
rather than syscall
and so will be unaffected.
go fix
tool will update many uses of the old time
package to use the new
+The go
fix
tool will update many uses of the old time
package to use the new
types and methods, although it does not replace values such as 1e9
representing nanoseconds per second.
Also, because of type changes in some of the values that arise,
@@ -755,7 +755,7 @@ may have the wrong type or require further analysis.
go fix
.
+few programs beyond the need to run go
fix
.
This category includes packages that are new in Go 1.
go fix
will update calls that assign the error to _.
+Running go
fix
will update calls that assign the error to _.
Calls that aren't fixed will be caught by the compiler and must be updated by hand.
Writer
and Reader
. Package flate
's
go fix
will update old names and calls that assign the error to _.
+Running go
fix
will update old names and calls that assign the error to _.
Calls that aren't fixed will be caught by the compiler and must be updated by hand.
hash.Hash
, such as md5.New
.
go fix
will perform the needed changes.
+Running go
fix
will perform the needed changes.
The crypto/x509 package
@@ -925,7 +925,7 @@ of the XML element being marshaled.
go fix
will update most uses of the package except for some calls to
+Running go
fix
will update most uses of the package except for some calls to
Unmarshal
. Special care must be taken with field tags,
since the fix tool will not update them and if not fixed by hand they will
misbehave silently in some cases. For example, the old
@@ -1088,7 +1088,7 @@ The previous behavior can be recreated by adding a nil
argument to
Existing implementations of hash.Hash
will need to add a
BlockSize
method. Hashes that process the input one byte at
a time can implement BlockSize
to return 1.
-Running go fix
will update calls to the Sum
methods of the various
+Running go
fix
will update calls to the Sum
methods of the various
implementations of hash.Hash
.
go fix
will update the few programs that are affected except for
+Running go
fix
will update the few programs that are affected except for
uses of RawURL
, which must be fixed by hand.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
The log/syslog package
@@ -1366,9 +1366,27 @@ Also, the function Wait
is gone; only the method of
the Process
type persists.
+The Waitmsg
type returned by
+Process.Wait
+has been replaced with a more portable
+ProcessState
+type with accessor methods to recover information about the
+process.
+Because of changes to Wait
, the ProcessState
+value always describes an exited process.
+Portability concerns simplified the interface in other ways, but the values returned by the
+ProcessState.Sys
and
+ProcessState.SysUsage
+methods can be type-asserted to underlying system-specific data structures such as
+syscall.WaitStatus
and
+syscall.Rusage
on Unix.
+
Updating:
-All changes will be caught by the compiler and must be updated by hand.
+Running go
fix
will drop a zero argument to Process.Wait
.
+All other changes will be caught by the compiler and must be updated by hand.
Updating:
-Running
Updating:
-Running
Updating:
-Running go fix
will update code that uses the old equivalent of the current os.FileInfo
+Running go
fix
will update code that uses the old equivalent of the current os.FileInfo
and os.FileMode
API.
Code that needs system-specific file details will need to be updated by hand.
Code that uses the old POSIX error values from the os
package
@@ -1556,7 +1574,7 @@ have been renamed to runtime.NumCgoCall
and runtime.NumGorout
go fix
will update code for the function renamings.
+Running go
fix
will update code for the function renamings.
Other code will need to be updated by hand.
go fix
will update almost all code affected by the change.
+Running go
fix
will update almost all code affected by the change.
§ Atoi
persists but Atoui
and Atof32
do not, so
they may require
-a cast that must be added by hand; the go fix
tool will warn about it.
+a cast that must be added by hand; the go
fix
tool will warn about it.