ioutil

package
v0.7.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadAllVerified

func ReadAllVerified(r io.Reader, expected digest.Digest) ([]byte, error)

ReadAllVerified reads from r until an error or EOF and returns the data it read if the data matches the expected digest. A successful call returns err == nil not err == EOF.

Types

type CountWriter

type CountWriter struct {
	W io.Writer
	N int64
}

CountWriter counts the written bytes

func NewCountWriter

func NewCountWriter(w io.Writer) *CountWriter

NewCountWriter generates a new writer

func (*CountWriter) Write

func (w *CountWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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