common

package
v0.0.0-...-63016fa Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFunc

type AddFunc func(ctx context.Context, path string, info fs.FileInfo, src io.Reader) error

AddFunc is the type of the function called for each file or directory visited. The path always have '/' as path separator. The src is nil for directories. Returning error will abort the caller.

type ArchiveWriteToFunc

type ArchiveWriteToFunc func(ctx context.Context, dest io.Writer) (int64, error)

ArchiveWriteToFunc is the type of the function that accepts a destination writer and returns the number of bytes written and an error.

type WriteCounter

type WriteCounter struct {
	io.Writer
	N int64
}

WriteCounter is a wrapper around io.Writer that counts the number of bytes written.

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Write implements io.Writer.

Jump to

Keyboard shortcuts

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