Documentation ¶
Index ¶
- Variables
- func ContextWithErrorLog(parent context.Context) (context.Context, <-chan error)
- func DErr(format string, a ...interface{})
- func DOut(format string, a ...interface{})
- func ExpandPathnames(paths []string) ([]string, error)
- func Hash(data []byte) (mh.Multihash, error)
- func LogError(ctx context.Context, err error)
- func PErr(format string, a ...interface{})
- func POut(format string, a ...interface{})
- func TildeExpansion(filename string) (string, error)
- type Key
- type KeySet
Constants ¶
This section is empty.
Variables ¶
var Debug bool
Debug is a global flag for debugging.
var ErrNotFound = ds.ErrNotFound
ErrNotFound is returned when a search fails to find anything
var ErrNotImplemented = errors.New("Error: not implemented yet.")
ErrNotImplemented signifies a function has not been implemented yet.
var ErrSearchIncomplete = errors.New("Error: Search Incomplete.")
ErrSeErrSearchIncomplete implies that a search type operation didnt find the expected node, but did find 'a' node.
var ErrTimeout = errors.New("Error: Call timed out.")
ErrTimeout implies that a timeout has been triggered
Functions ¶
func ContextWithErrorLog ¶
ContextWithErrorLog returns a copy of parent and an error channel that can be used to receive errors sent with the LogError method.
func DErr ¶
func DErr(format string, a ...interface{})
DErr is a shorthand debug printing function to output to Stderr. Will only print if Debug is true.
func DOut ¶
func DOut(format string, a ...interface{})
DOut is a shorthand debug printing function to output to Stdout. Will only print if Debug is true.
func ExpandPathnames ¶
ExpandPathnames takes a set of paths and turns them into absolute paths
func LogError ¶
LogError logs the error to the owner of the context.
If this context was created with ContextWithErrorLog, then this method passes the error to context creator over an unbuffered channel.
If this context was created by other means, this method is a no-op.
func PErr ¶
func PErr(format string, a ...interface{})
PErr is a shorthand printing function to output to Stderr.
func POut ¶
func POut(format string, a ...interface{})
POut is a shorthand printing function to output to Stdout.
func TildeExpansion ¶
TildeExpansion expands a filename, which may begin with a tilde.