Help us shape the future of Go! Take the 2026 Go Developer Survey

uri

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 7 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 added in v1.3.0

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