From 33a06ab3a5a5447e91a11862875cdb1205a263a1 Mon Sep 17 00:00:00 2001 From: Rafid Bin Mostofa Date: Fri, 29 Nov 2024 20:00:47 +0600 Subject: [PATCH] refactor: s/readSeeker/readSeek/ --- internal/testutil/archive.go | 2 +- internal/testutil/nopcloser.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/testutil/archive.go b/internal/testutil/archive.go index 041130c2..d06fd1b0 100644 --- a/internal/testutil/archive.go +++ b/internal/testutil/archive.go @@ -37,7 +37,7 @@ func (a *TestArchive) Fetch(pkgName string) (io.ReadSeekCloser, *archive.Package SHA256: pkg.Hash, Arch: pkg.Arch, } - return ReadSeekerNopCloser(bytes.NewReader(pkg.Data)), info, nil + return ReadSeekNopCloser(bytes.NewReader(pkg.Data)), info, nil } func (a *TestArchive) Exists(pkg string) bool { diff --git a/internal/testutil/nopcloser.go b/internal/testutil/nopcloser.go index e771527e..ddaeece7 100644 --- a/internal/testutil/nopcloser.go +++ b/internal/testutil/nopcloser.go @@ -4,16 +4,16 @@ import ( "io" ) -// readSeekerNopCloser is an io.Reader that does nothing on Close, and +// readSeekNopCloser is an io.Reader that does nothing on Close, and // seeks to the beginning of the stream on Seek. // It is an extension of io.NopCloser that also implements io.Seeker. -type readSeekerNopCloser struct { +type readSeekNopCloser struct { io.ReadSeeker } // Close does nothing. -func (readSeekerNopCloser) Close() error { return nil } +func (readSeekNopCloser) Close() error { return nil } -func ReadSeekerNopCloser(r io.ReadSeeker) io.ReadSeekCloser { - return readSeekerNopCloser{r} +func ReadSeekNopCloser(r io.ReadSeeker) io.ReadSeekCloser { + return readSeekNopCloser{r} }