From dd442a556e5d9457caf318cd9b77e0a58041ab72 Mon Sep 17 00:00:00 2001
From: Rob Pike
+In Go 1, the FormatMediaType function
+of the mime package has been simplified to make it
+consistent with
+ParseMediaType.
+It now takes "text/html" rather than "text" and "html".
+
+Updating: +What little code is affected will be caught by the compiler and must be updated by hand. +
+@@ -1140,7 +1155,7 @@ reads and writes will time out and no longer block.
-There is also a new net.DialTimeout method to simplify
+There is also a new net.DialTimeout method to simplify
timing out dialing a network address.
os.FileMode API.
Code that needs system-specific file details will need to be updated by hand.
+
+In Go 1, the Walk function of the
+path/filepath package
+has been changed to take a function value of type
+WalkFunc
+instead of a Visitor interface value.
+WalkFunc unifies the handling of both files and directories.
+
+ type WalkFunc func(path string, info *os.FileInfo, err os.Error) os.Error ++ +
+The WalkFunc function will be called even for files or directories that could not be opened;
+in such cases the error argument will describe the failure.
+If a directory's contents are to be skipped,
+the function should return the value SkipDir.
+
+TODO: add an example? +
+ ++Updating: +The change simplifies most code but has subtle consequences, so affected programs +will need to be updated by hand. +The compiler will catch code using the old interface. +
+diff --git a/doc/go1.tmpl b/doc/go1.tmpl index 59c78d2a40..737507b9bb 100644 --- a/doc/go1.tmpl +++ b/doc/go1.tmpl @@ -1027,6 +1027,21 @@ and Gofix will update almost all code affected by the change.
+
+In Go 1, the FormatMediaType function
+of the mime package has been simplified to make it
+consistent with
+ParseMediaType.
+It now takes "text/html" rather than "text" and "html".
+
+Updating: +What little code is affected will be caught by the compiler and must be updated by hand. +
+@@ -1043,7 +1058,7 @@ reads and writes will time out and no longer block.
-There is also a new net.DialTimeout method to simplify
+There is also a new net.DialTimeout method to simplify
timing out dialing a network address.
os.FileMode API.
Code that needs system-specific file details will need to be updated by hand.
+
+In Go 1, the Walk function of the
+path/filepath package
+has been changed to take a function value of type
+WalkFunc
+instead of a Visitor interface value.
+WalkFunc unifies the handling of both files and directories.
+
+ type WalkFunc func(path string, info *os.FileInfo, err os.Error) os.Error ++ +
+The WalkFunc function will be called even for files or directories that could not be opened;
+in such cases the error argument will describe the failure.
+If a directory's contents are to be skipped,
+the function should return the value SkipDir.
+
+TODO: add an example? +
+ ++Updating: +The change simplifies most code but has subtle consequences, so affected programs +will need to be updated by hand. +The compiler will catch code using the old interface. +
+-- 2.51.0