util

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRC32Equal

func CRC32Equal(b []byte, c uint32) bool

CRC32Equal compares CRC32 checksums.

Types

type ReadCloser

type ReadCloser interface {
	Reader
	io.Closer
}

ReadCloser is a Reader that is also an io.Closer.

func ByteReadCloser

func ByteReadCloser(r io.ReadCloser) ReadCloser

ByteReadCloser returns a ReadCloser either by returning the io.ReadCloser r if it implements the interface, or wrapping it with a ReadByte method.

func NopCloser

func NopCloser(r Reader) ReadCloser

NopCloser returns a ReadCloser with a no-op Close method wrapping the provided Reader r.

type Reader

type Reader interface {
	io.Reader
	io.ByteReader
}

Reader is both an io.Reader and io.ByteReader.

type SizeReadSeekCloser

type SizeReadSeekCloser interface {
	io.Reader
	io.Seeker
	io.Closer
	Size() int64
}

SizeReadSeekCloser is an io.Reader, io.Seeker, and io.Closer with a Size method.

Jump to

Keyboard shortcuts

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