From 8fcd3c148707d8cace2f375e537c30a821ea2516 Mon Sep 17 00:00:00 2001 From: wangjingcun Date: Tue, 19 Nov 2024 18:29:19 +0800 Subject: [PATCH] common: Fix some GoDoc typos --- common/constants/constants.go | 2 +- common/hugio/readers.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/constants/constants.go b/common/constants/constants.go index 48813e79b..b2cb4fb73 100644 --- a/common/constants/constants.go +++ b/common/constants/constants.go @@ -41,7 +41,7 @@ const ( ResourceTransformationFingerprint = "fingerprint" ) -// IsResourceTransformationLinkChange returns whether the given name is a resource transformation that changes the permalink based on the content. +// IsResourceTransformationPermalinkHash returns whether the given name is a resource transformation that changes the permalink based on the content. func IsResourceTransformationPermalinkHash(name string) bool { return name == ResourceTransformationFingerprint } diff --git a/common/hugio/readers.go b/common/hugio/readers.go index 25e327908..c4304c84e 100644 --- a/common/hugio/readers.go +++ b/common/hugio/readers.go @@ -74,13 +74,13 @@ type StringReader interface { ReadString() string } -// NewReadSeekerNoOpCloserFromString uses strings.NewReader to create a new ReadSeekerNoOpCloser +// NewReadSeekerNoOpCloserFromBytes uses bytes.NewReader to create a new ReadSeekerNoOpCloser // from the given bytes slice. func NewReadSeekerNoOpCloserFromBytes(content []byte) readSeekerNopCloser { return readSeekerNopCloser{bytes.NewReader(content)} } -// NewReadSeekCloser creates a new ReadSeekCloser from the given ReadSeeker. +// NewOpenReadSeekCloser creates a new ReadSeekCloser from the given ReadSeeker. // The ReadSeeker will be seeked to the beginning before returned. func NewOpenReadSeekCloser(r ReadSeekCloser) OpenReadSeekCloser { return func() (ReadSeekCloser, error) {