uri

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

copied from gopls the Go language server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(a, b URI) int

CompareURI performs a three-valued comparison of two URIs. Lexically unequal URIs may compare equal if they are "file:" URIs that share the same base name (ignoring case) and denote the same file device/inode, according to stat(2).

Types

type URI

type URI string

URI represents the full URI for a file.

func FromPath

func FromPath(path string) URI

URIFromPath returns a span URI for the supplied file path.

For empty paths, URIFromPath returns the empty URI "". For non-empty paths, URIFromPath returns a uri with the file:// scheme.

func FromURI

func FromURI(s string) URI

func (URI) Filepath

func (uri URI) Filepath() string

Filename returns the file path for the given URI. It is an error to call this on a URI that is not a valid filename.

func (URI) IsFile

func (uri URI) IsFile() bool

Jump to

Keyboard shortcuts

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