From 47db50b273eb8af7d1e6abbb7e7983e1d4509cdc Mon Sep 17 00:00:00 2001 From: Damian Gryski Date: Wed, 24 Nov 2021 14:41:00 -0800 Subject: [PATCH] os: add a stub for File.Truncate --- src/os/file.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/os/file.go b/src/os/file.go index 2af911229..bb7b3f0dc 100644 --- a/src/os/file.go +++ b/src/os/file.go @@ -174,6 +174,11 @@ func (f *File) Fd() uintptr { panic("unimplemented: os.file.Fd()") } +// Truncate is a stub, not yet implemented +func (f *File) Truncate(size int64) error { + return &PathError{"truncate", f.name, ErrNotImplemented} +} + const ( PathSeparator = '/' // OS-specific path separator PathListSeparator = ':' // OS-specific path list separator