go/src/io
Alan Donovan 586e205522 std: add //go:fix inline directives to some deprecated functions
In particular, we apply it only to functions where it is always
a code improvement to inline the call.
We also apply it to some constants.

In a few cases this may introduce a panic statement at the
caller, which is debatable, but making the potential for panic
evident is the purpose of the deprecation.

The gofix analyzer in gopls v0.18 will show a diagnostic for calls
to the annotated functions, and will offer to inline the call.

The new //go:fix annotation needs a special exemption in the
pragma check in the compiler.

Updates #32816

Change-Id: I43bf15648ac12251734109eb7102394f8a76d55e
Reviewed-on: https://go-review.googlesource.com/c/go/+/648995
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Commit-Queue: Alan Donovan <adonovan@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-02-15 08:06:58 -08:00
..
fs io/fs: add ReadLinkFS interface 2025-02-03 08:38:43 -08:00
ioutil std: add //go:fix inline directives to some deprecated functions 2025-02-15 08:06:58 -08:00
example_test.go
export_test.go
io.go io: fix typo inside copyBuffer 2024-04-15 17:34:10 +00:00
io_test.go io: simplify tests by removing redundant statements 2024-11-05 19:52:23 +00:00
multi.go
multi_test.go io: use runtime.AddCleanup instead of runtime.SetFinalizer 2025-02-13 09:11:02 -08:00
pipe.go io: add available godoc link 2023-10-18 19:34:35 +00:00
pipe_test.go io: add test for Pipe constructor allocations 2024-07-07 19:43:22 +00:00