utils

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBlobExact added in v0.1.8

func CopyBlobExact(dst io.Writer, body io.Reader, digest string, size int64) error

CopyBlobExact copies exactly size bytes and errors on mismatch.

func FirstNonEmpty

func FirstNonEmpty(values ...string) string

FirstNonEmpty returns the first non-blank value from the given strings.

func HumanSize

func HumanSize(b int64) string

HumanSize formats a byte count as a human-readable string (e.g. "1.2G").

func ParseRef

func ParseRef(ref string) (string, string)

ParseRef splits "name:tag" into name and tag; defaults tag to "latest".

func SHA256Hex

func SHA256Hex(data []byte) string

SHA256Hex returns the hex-encoded SHA-256 digest of data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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