diff options
author | Runxi Yu <me@runxiyu.org> | 2025-01-04 22:03:24 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-01-04 22:03:24 +0800 |
commit | f57ba68adb4d9a3781320da9343e5e021c5a8e9e (patch) | |
tree | fed18a68eddfb01557cf7206c2cd3374b4b79ec1 /misc/open_file.go | |
parent | misc: O_CLOEXEC to all open-related syscalls (diff) | |
download | go-lindenii-common-f57ba68adb4d9a3781320da9343e5e021c5a8e9e.tar.gz go-lindenii-common-f57ba68adb4d9a3781320da9343e5e021c5a8e9e.tar.zst go-lindenii-common-f57ba68adb4d9a3781320da9343e5e021c5a8e9e.zip |
misc: Make Dir_t.Close() a method
Diffstat (limited to 'misc/open_file.go')
-rw-r--r-- | misc/open_file.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/open_file.go b/misc/open_file.go index 5bc6067..ec5d402 100644 --- a/misc/open_file.go +++ b/misc/open_file.go @@ -52,7 +52,7 @@ func Open_directory_readonly(path string) (Dir_t, error) { } // Close a directory returned by [Open_directory_readonly]. -func Close_directory(dir Dir_t) error { +func (dir *Dir_t) Close() error { return syscall.Close(dir.fd) } |