Documentation
¶
Index ¶
- Variables
- func Register(scheme string, resolver Resolver)
- func Resolve(ctx context.Context, path string) (io.ReadCloser, error)
- func SetDefault(scheme string)
- func WithResolver(ctx context.Context, resolver Resolver) context.Context
- func WithWorkDir(ctx context.Context, path Path) context.Context
- type Path
- func (p Path) Abs() (Path, error)
- func (p Path) Base() Path
- func (p Path) Dir() Path
- func (p Path) Host() string
- func (p Path) IsAbs() bool
- func (p Path) IsURL() bool
- func (p Path) Join(paths ...Path) Path
- func (p Path) JoinPath(paths ...string) Path
- func (p Path) Scheme() string
- func (p Path) String() string
- func (p Path) URL() (*url.URL, error)
- func (p Path) URLPath() string
- func (p Path) WithAuth(username, password string) Path
- type Registry
- type Resolver
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultResolver = NewRegistry()
View Source
var (
ErrSchemeNotRegistered = errors.New("scheme not registered")
)
Functions ¶
func SetDefault ¶ added in v0.22.0
func SetDefault(scheme string)
func WithResolver ¶ added in v0.10.0
Types ¶
type Path ¶ added in v0.29.0
type Path string
func ContextWorkDir ¶ added in v0.10.0
func (Path) Host ¶ added in v0.29.0
Host returns the host part of the URL, or empty string if not a URL
func (Path) JoinPath ¶ added in v0.29.0
JoinPath joins the current path with additional path segments
func (Path) Scheme ¶ added in v0.29.0
Scheme returns the scheme of the path if it's a URL, empty string otherwise
Click to show internal directories.
Click to hide internal directories.