From f57ba68adb4d9a3781320da9343e5e021c5a8e9e Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 4 Jan 2025 22:03:24 +0800 Subject: misc: Make Dir_t.Close() a method --- misc/open_file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc') 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) } -- cgit v1.2.3