From ee9c6678d5cccc7e337de899db372ee514ba0748 Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Sat, 10 Feb 2024 09:14:13 +0800 Subject: [PATCH] change to pointer receiver --- src/internal/xcoff/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/xcoff/file.go b/src/internal/xcoff/file.go index 9473a11f15..ea29c3978f 100644 --- a/src/internal/xcoff/file.go +++ b/src/internal/xcoff/file.go @@ -262,7 +262,7 @@ func NewFile(r io.ReaderAt) (*File, error) { } r2 := r if scnptr == 0 { // .bss must have all 0s - r2 = nobitsSectionReader{} + r2 = new(nobitsSectionReader) } s.sr = io.NewSectionReader(r2, int64(scnptr), int64(s.Size)) s.ReaderAt = s.sr @@ -454,7 +454,7 @@ func NewFile(r io.ReaderAt) (*File, error) { type nobitsSectionReader struct{} -func (nobitsSectionReader) ReadAt(p []byte, off int64) (n int, err error) { +func (*nobitsSectionReader) ReadAt(p []byte, off int64) (n int, err error) { return 0, errors.New("unexpected read from section with uninitialized data") }