internal

package
v0.0.0-...-bd4bd5f Latest Latest
Warning

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

Go to latest
Published: May 13, 2018 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package internal implements internal logic for the pathlist package.

Parameter names refer to "type":

fp: filepath (single, raw/unquoted)
l:  list (0 or more elems, potentially quoted)
e:  elem (single, potentially quoted)
el: e or l

TODO(speter): sane behavior on elems containing unclosed quotes

Index

Constants

View Source
const (
	ErrSep   = "filepath must not contain ListSeparator" // Unix only
	ErrQuote = "filepath must not be quoted"             // Windows only
)
View Source
const ListSeparator = os.PathListSeparator

Variables

This section is empty.

Functions

func Append

func Append(l, e string) string

func CloseQuote

func CloseQuote(el string) string

func Filepaths

func Filepaths(l string) []string

func NewElem

func NewElem(fp string) (string, error)

func NewList

func NewList(e ...string) string

func Prepend

func Prepend(l, e string) string

Types

type Error

type Error struct {
	Cause_    string
	Filepath_ string
}

func (Error) Cause

func (e Error) Cause() string

func (Error) Error

func (e Error) Error() string

Error implements the pathlist.Error interface.

func (Error) Filepath

func (e Error) Filepath() string

Jump to

Keyboard shortcuts

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