]> git.maquefel.me Git - brevno-suite/hugo/commitdiff
common: Fix some GoDoc typos
authorwangjingcun <wangjingcun@aliyun.com>
Tue, 19 Nov 2024 10:29:19 +0000 (18:29 +0800)
committerGitHub <noreply@github.com>
Tue, 19 Nov 2024 10:29:19 +0000 (11:29 +0100)
common/constants/constants.go
common/hugio/readers.go

index 48813e79b993ec028403471ccc7106f66a6ca8ff..b2cb4fb73954dbf3e3fe20b7794c7a863070fac9 100644 (file)
@@ -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
 }
index 25e327908743daaf9502beae27521a712f61d552..c4304c84ee12f3d099bce1e9701846451850d0af 100644 (file)
@@ -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) {