Skip to content

Commit dc12cb1

Browse files
cuishuanggopherbot
authored andcommitted
compress: some minor corrections or adjustments for godoc link
Change-Id: Ic1fc777b9a4e8262851e27646d53a0ec4fe55b64 Reviewed-on: https://go-review.googlesource.com/c/go/+/535076 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: shuang cui <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Joseph Tsai <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 34f2365 commit dc12cb1

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/compress/bzip2/bit_reader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func newBitReader(r io.Reader) bitReader {
3232

3333
// ReadBits64 reads the given number of bits and returns them in the
3434
// least-significant part of a uint64. In the event of an error, it returns 0
35-
// and the error can be obtained by calling [bitReader.Err]().
35+
// and the error can be obtained by calling bitReader.Err().
3636
func (br *bitReader) ReadBits64(bits uint) (n uint64) {
3737
for bits > br.bits {
3838
b, err := br.r.ReadByte()

src/compress/flate/inflate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ func (f *decompressor) Reset(r io.Reader, dict []byte) error {
803803
// The reader returns [io.EOF] after the final block in the DEFLATE stream has
804804
// been encountered. Any trailing data after the final block is ignored.
805805
//
806-
// The ReadCloser returned by NewReader also implements [Resetter].
806+
// The [io.ReadCloser] returned by NewReader also implements [Resetter].
807807
func NewReader(r io.Reader) io.ReadCloser {
808808
fixedHuffmanDecoderInit()
809809

src/compress/gzip/gunzip.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ type Reader struct {
8888
//
8989
// It is the caller's responsibility to call Close on the [Reader] when done.
9090
//
91-
// The Reader.Header fields will be valid in the [Reader] returned.
91+
// The [Reader.Header] fields will be valid in the [Reader] returned.
9292
func NewReader(r io.Reader) (*Reader, error) {
9393
z := new(Reader)
9494
if err := z.Reset(r); err != nil {

src/compress/lzw/writer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (w *Writer) Close() error {
238238
return w.w.Flush()
239239
}
240240

241-
// Reset clears the[ Writer]'s state and allows it to be reused again
241+
// Reset clears the [Writer]'s state and allows it to be reused again
242242
// as a new [Writer].
243243
func (w *Writer) Reset(dst io.Writer, order Order, litWidth int) {
244244
*w = Writer{}

src/compress/zlib/reader.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ type Resetter interface {
7070
// data than necessary from r.
7171
// It is the caller's responsibility to call Close on the ReadCloser when done.
7272
//
73-
// The ReadCloser returned by NewReader also implements [Resetter].
73+
// The [io.ReadCloser] returned by NewReader also implements [Resetter].
7474
func NewReader(r io.Reader) (io.ReadCloser, error) {
7575
return NewReaderDict(r, nil)
7676
}
@@ -119,9 +119,9 @@ func (z *reader) Read(p []byte) (int, error) {
119119
return n, io.EOF
120120
}
121121

122-
// Calling Close does not close the wrapped io.Reader originally passed to [NewReader].
122+
// Calling Close does not close the wrapped [io.Reader] originally passed to [NewReader].
123123
// In order for the ZLIB checksum to be verified, the reader must be
124-
// fully consumed until the io.EOF.
124+
// fully consumed until the [io.EOF].
125125
func (z *reader) Close() error {
126126
if z.err != nil && z.err != io.EOF {
127127
return z.err

0 commit comments

Comments
 (0)