@@ -499,6 +499,44 @@ <h3 id="fs">File Systems</h3>
499
499
implementations.
500
500
</ p >
501
501
502
+ < h3 id ="ioutil "> Deprecation of io/ioutil</ h3 >
503
+
504
+ < p >
505
+ The < a href ="/pkg/io/ioutil/ "> < code > io/ioutil</ code > </ a > package has
506
+ turned out to be a poorly defined and hard to understand collection
507
+ of things. All functionality provided by the package has been moved
508
+ to other packages. The < code > io/ioutil</ code > package remains and
509
+ will continue to work as before, but we encourage new code to use
510
+ the new definitions in the < a href ="/pkg/io/ "> < code > io</ code > </ a > and
511
+ < a href ="/pkg/os/ "> < code > os</ code > </ a > packages.
512
+
513
+ Here is a list of the new locations of the names exported
514
+ by < code > io/ioutil</ code > :
515
+ < ul >
516
+ < li > < a href ="/pkg/io/ioutil/#Discard "> < code > Discard</ code > </ a >
517
+ => < a href ="/pkg/io/#Discard "> < code > io.Discard</ code > </ a > </ li >
518
+ < li > < a href ="/pkg/io/ioutil/#NopCloser "> < code > NopCloser</ code > </ a >
519
+ => < a href ="/pkg/io/#NopCloser "> < code > io.NopCloser</ code > </ a > </ li >
520
+ < li > < a href ="/pkg/io/ioutil/#ReadAll "> < code > ReadAll</ code > </ a >
521
+ => < a href ="/pkg/io/#ReadAll "> < code > io.ReadAll</ code > </ a > </ li >
522
+ < li > < a href ="/pkg/io/ioutil/#ReadDir "> < code > ReadDir</ code > </ a >
523
+ => < a href ="/pkg/os/#ReadDir "> < code > os.ReadDir</ code > </ a >
524
+ (note: returns a slice of
525
+ < a href ="/pkg/os/#DirEntry "> < code > os.DirEntry</ code > </ a >
526
+ rather than a slice of
527
+ < a href ="/pkg/fs/#FileInfo "> < code > fs.FileInfo</ code > </ a > )
528
+ </ li >
529
+ < li > < a href ="/pkg/io/ioutil/#ReadFile "> < code > ReadFile</ code > </ a >
530
+ => < a href ="/pkg/os/#ReadFile "> < code > os.ReadFile</ code > </ a > </ li >
531
+ < li > < a href ="/pkg/io/ioutil/#TempDir "> < code > TempDir</ code > </ a >
532
+ => < a href ="/pkg/os/#MkdirTemp "> < code > os.MkdirTemp</ code > </ a > </ li >
533
+ < li > < a href ="/pkg/io/ioutil/#TempFile "> < code > TempFile</ code > </ a >
534
+ => < a href ="/pkg/os/#CreateTemp "> < code > os.CreateTemp</ code > </ a > </ li >
535
+ < li > < a href ="/pkg/io/ioutil/#WriteFile "> < code > WriteFile</ code > </ a >
536
+ => < a href ="/pkg/os/#WriteFile "> < code > os.WriteFile</ code > </ a > </ li >
537
+ </ ul >
538
+ </ p >
539
+
502
540
<!-- okay-after-beta1
503
541
TODO: decide if any additional changes are worth factoring out from
504
542
"Minor changes to the library" and highlighting in "Core library"
@@ -742,6 +780,15 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
742
780
The package now defines a
743
781
< a href ="/pkg/io/#ReadSeekCloser "> < code > ReadSeekCloser</ code > </ a > interface.
744
782
</ p >
783
+
784
+ < p > <!-- CL 263141 -->
785
+ The package now defines
786
+ < a href ="/pkg/io/#Discard "> < code > Discard</ code > </ a > ,
787
+ < a href ="/pkg/io/#NopCloser "> < code > NopCloser</ code > </ a > , and
788
+ < a href ="/pkg/io/#ReadAll "> < code > ReadAll</ code > </ a > ,
789
+ to be used instead of the same names in the
790
+ < a href ="/pkg/io/ioutil/ "> < code > io/ioutil</ code > </ a > package.
791
+ </ p >
745
792
</ dd >
746
793
</ dl > <!-- io -->
747
794
@@ -896,6 +943,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
896
943
instead of the unexported < code > errFinished</ code > when the process has
897
944
already finished.
898
945
</ p >
946
+
947
+ < p > <!-- CL 263141 -->
948
+ The package now defines
949
+ < a href ="/pkg/os/#CreateTemp "> < code > CreateTemp</ code > </ a > ,
950
+ < a href ="/pkg/os/#MkdirTemp "> < code > MkdirTemp</ code > </ a > ,
951
+ < a href ="/pkg/os/#ReadFile "> < code > ReadFile</ code > </ a > , and
952
+ < a href ="/pkg/os/#WriteFile "> < code > WriteFile</ code > </ a > ,
953
+ to be used instead of functions defined in the
954
+ < a href ="/pkg/io/ioutil/ "> < code > io/ioutil</ code > </ a > package.
955
+ </ p >
899
956
</ dd >
900
957
</ dl > <!-- os -->
901
958
0 commit comments