fetch

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package fetch resolves a resource reference — a data: URI, an http(s) URL, or a local file path — to raw bytes, with a size cap and a scheme allowlist. It is the shared byte loader for external assets such as registered fonts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(src string) ([]byte, error)

Bytes resolves src to raw bytes. Supported sources: data: URIs, http:// and https:// URLs, and local file paths (no scheme). Any other scheme is rejected with a descriptive error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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