]> Cypherpunks repositories - gostls13.git/commit
os: use AddCleanup to close files
authorCarlos Amedee <carlos@golang.org>
Mon, 23 Dec 2024 16:27:20 +0000 (11:27 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 13 Feb 2025 16:20:22 +0000 (08:20 -0800)
commitfdaac84480b02e600660d0ca7c15339138807107
treed80ae98513ee3a894838fd9dc117f74670ebd354
parentf91ac1b61eb7c18773ff01be58a39f49de436585
os: use AddCleanup to close files

This changes the finalizer mechanism used to close files from
runtime.SetFinalizer to runtime.AddCleanup.

Updates #70907

Change-Id: I47582b81b0ed69609dd9dac158ec7bb8819c8c77
Reviewed-on: https://go-review.googlesource.com/c/go/+/638555
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/os/file_plan9.go
src/os/file_unix.go
src/os/file_windows.go
src/os/root_openat.go
src/os/root_unix.go
src/os/root_windows.go