aboutsummaryrefslogtreecommitdiff
path: root/src/archive
diff options
context:
space:
mode:
authorcui fliter <imcusg@gmail.com>2022-11-14 20:13:10 +0800
committerGopher Robot <gobot@golang.org>2022-12-03 17:08:51 +0000
commit3a7a528c2d7ee0c7b2988a7aee0b9347e973cbed (patch)
tree357ab80e81b101c245d07fa4d61be2199ea0a30c /src/archive
parentc0497d1a81b1104a3981be33abfd66252cea90c8 (diff)
downloadgo-3a7a528c2d7ee0c7b2988a7aee0b9347e973cbed.tar.gz
go-3a7a528c2d7ee0c7b2988a7aee0b9347e973cbed.zip
all: fix some comments for method
Change-Id: I4cff6b2a1fed6acdf754539c3c53a61eaa3b3f84 Reviewed-on: https://go-review.googlesource.com/c/go/+/450176 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Keith Randall <khr@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Martin Möhrmann <moehrmann@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/archive')
-rw-r--r--src/archive/tar/format.go4
-rw-r--r--src/archive/tar/reader.go2
-rw-r--r--src/archive/tar/writer.go2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/archive/tar/format.go b/src/archive/tar/format.go
index 8898c438b5..e50124d99e 100644
--- a/src/archive/tar/format.go
+++ b/src/archive/tar/format.go
@@ -166,7 +166,7 @@ func (b *block) toSTAR() *headerSTAR { return (*headerSTAR)(b) }
func (b *block) toUSTAR() *headerUSTAR { return (*headerUSTAR)(b) }
func (b *block) toSparse() sparseArray { return sparseArray(b[:]) }
-// GetFormat checks that the block is a valid tar header based on the checksum.
+// getFormat checks that the block is a valid tar header based on the checksum.
// It then attempts to guess the specific format based on magic values.
// If the checksum fails, then FormatUnknown is returned.
func (b *block) getFormat() Format {
@@ -239,7 +239,7 @@ func (b *block) computeChecksum() (unsigned, signed int64) {
return unsigned, signed
}
-// Reset clears the block with all zeros.
+// reset clears the block with all zeros.
func (b *block) reset() {
*b = block{}
}
diff --git a/src/archive/tar/reader.go b/src/archive/tar/reader.go
index a4e35bddb2..52a3150fc4 100644
--- a/src/archive/tar/reader.go
+++ b/src/archive/tar/reader.go
@@ -696,7 +696,7 @@ func (fr regFileReader) logicalRemaining() int64 {
return fr.nb
}
-// logicalRemaining implements fileState.physicalRemaining.
+// physicalRemaining implements fileState.physicalRemaining.
func (fr regFileReader) physicalRemaining() int64 {
return fr.nb
}
diff --git a/src/archive/tar/writer.go b/src/archive/tar/writer.go
index 9b2e3e25d4..1c95f0738a 100644
--- a/src/archive/tar/writer.go
+++ b/src/archive/tar/writer.go
@@ -519,7 +519,7 @@ func (fw regFileWriter) logicalRemaining() int64 {
return fw.nb
}
-// logicalRemaining implements fileState.physicalRemaining.
+// physicalRemaining implements fileState.physicalRemaining.
func (fw regFileWriter) physicalRemaining() int64 {
return fw.nb
}