uri

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(uriStr string) (io.ReadCloser, error)

Open open a local file or a remote file

func OpenWithClient

func OpenWithClient(uriStr string, client *http.Client) (io.ReadCloser, error)

OpenWithClient opens a local file or a remote file, using the given (non-nil) HTTP client for http/https URLs. Callers that must confine remote access (e.g. to defeat SSRF via redirects) should pass a client whose transport validates the peer at dial time; Open passes http.DefaultClient.

Types

type ErrURISchemeNotSupported

type ErrURISchemeNotSupported struct {
	Scheme string
}

ErrURISchemeNotSupported represents a scheme error

func (ErrURISchemeNotSupported) Error

func (e ErrURISchemeNotSupported) Error() string

Jump to

Keyboard shortcuts

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