resourceloader

package
v1.121.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPathForResource

func GetPathForResource(resourcePath string) (string, error)

GetPathForResource tries to load a file or URL from the given path. If the path starts with "http://" or "https://", it will try to load the file from the URL and save it in a temporary file. It will return the path to the temporary file. If the path is an actual file path, it will return the filepath

Types

type UnrecognizedSchemeError

type UnrecognizedSchemeError struct {
	Scheme string
}

UnrecognizedSchemeError is an error type for when a URL scheme is not recognized out of the supported ones.

func (*UnrecognizedSchemeError) Error

func (e *UnrecognizedSchemeError) Error() string

Jump to

Keyboard shortcuts

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