util

package
Version: v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAbs

func IsAbs(path string) bool

IsAbs returns true if the given path is absolute

func IsURI

func IsURI(s lsp.DocumentURI) bool

IsURI tells if s denotes an URI

func IsVendorDir

func IsVendorDir(dir string) bool

IsVendorDir tells if the specified directory is a vendor directory.

func Panicf

func Panicf(r interface{}, format string, v ...interface{}) error

Panicf takes the return value of recover() and outputs data to the log with the stack trace appended. Arguments are handled in the manner of fmt.Printf. Arguments should format to a string which identifies what the panic code was doing. Returns a non-nil error if it recovered from a panic.

func PathEqual

func PathEqual(a, b string) bool

PathEqual returns true if both a and b are equal

func PathHasPrefix

func PathHasPrefix(s, prefix string) bool

PathHasPrefix returns true if s is starts with the given prefix

func PathToURI

func PathToURI(path string) lsp.DocumentURI

PathToURI converts given absolute path to file URI

func PathTrimPrefix

func PathTrimPrefix(s, prefix string) string

PathTrimPrefix removes the prefix from s

func PrepareContext

func PrepareContext(bctx *build.Context, ctx context.Context, fs ctxvfs.FileSystem)

func UriToPath

func UriToPath(uri lsp.DocumentURI) string

UriToPath converts given file URI to path

func UriToRealPath

func UriToRealPath(uri lsp.DocumentURI) string

UriToRealPath converts the given file URI to the platform specific path

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL