utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteCountIEC

func ByteCountIEC(b uint64) string

func ByteCountSI

func ByteCountSI(b uint64) string

func RandomString

func RandomString(rand *rand.Rand, n int) string

Types

type ChecksumWriter

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

func NewChecksumWriter

func NewChecksumWriter(w io.Writer) *ChecksumWriter

func (*ChecksumWriter) Checksum

func (w *ChecksumWriter) Checksum() uint32

func (*ChecksumWriter) Write

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

type CountWriter

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

func NewCountWriter

func NewCountWriter(w io.Writer) *CountWriter

func (*CountWriter) Count

func (w *CountWriter) Count() uint64

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