resourcelib

package
v0.4.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: Apache-2.0 Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package resourcelib connects pkg/assets to pkg/resource.Library without widening resource.Library's public API.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReadFile reads path from lib's underlying fs.FS when lib is a non-nil
	// *resource.Library with a non-nil file system. ok reports whether lib had
	// a file system to read from.
	ReadFile func(lib any, path string) (data []byte, ok bool, err error)

	// RetainExisting increments the retain count for path in lib when path is
	// already cached and returns the cached resource.
	RetainExisting func(lib any, path string) (res any, ok bool)

	// StoreRetain stores r, parsed from data, at path in lib if not already loaded (recording data as the path's Library.Source), increments its retain count, and returns the canonical cached resource.
	StoreRetain func(lib any, path string, r any, data []byte) (res any, err error)
)

Hooks populated by pkg/resource's init.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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