Help us shape the future of Go! Take the 2026 Go Developer Survey

ioutil

package
v0.35.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Package ioutil implements I/O utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SeekingReaderAt

type SeekingReaderAt struct {
	// contains filtered or unexported fields
}

SeekingReaderAt implements io.ReaderAt through an underlying io.ReadSeeker.

func NewSeekingReaderAt

func NewSeekingReaderAt(r io.ReadSeeker) *SeekingReaderAt

NewSeekingReaderAt creates a new SeekingReaderAt. The SeekingReaderAt takes ownership of r and will modify its seek offset, so callers should not use r after this call.

func (*SeekingReaderAt) Close

func (s *SeekingReaderAt) Close() error

Close implements io.Closer.

func (*SeekingReaderAt) ReadAt

func (s *SeekingReaderAt) ReadAt(p []byte, off int64) (n int, _ error)

ReadAt implements io.ReaderAt.

func (*SeekingReaderAt) Size

func (s *SeekingReaderAt) Size() (int64, error)

Size implements SizeReaderAt.

type SizeReaderAt

type SizeReaderAt interface {
	Size() (int64, error)
	io.ReaderAt
}

A SizeReaderAt is an io.ReaderAt with a Size method. Use NewSizeReaderAt to adapt different Size interfaces.

func NewSizeReaderAt

func NewSizeReaderAt(r io.ReaderAt) SizeReaderAt

NewSizeReaderAt returns a SizeReaderAt given an io.ReaderAt that implements one of:

  • Size() (int64, error)
  • Size() int64
  • Len() int
  • Stat() (fs.FileInfo, error)
  • Seek(offset int64, whence int) (int64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL