Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NopCloser = NewCloser(func() error { return nil })
Functions ¶
func Close ¶
func Close(c Closer)
Close is a convenience function to close a object that has a Close() method, ignoring any errors Used to satisfy errcheck lint
func NewByteReadSeeker ¶ added in v2.1.1
func NewByteReadSeeker(data []byte) *byteReadSeeker
func NewComposableFS ¶ added in v2.1.1
NewComposableFS creates files system that attempts reading file from multiple wrapped file systems
func NewSubDirFS ¶ added in v2.1.1
NewSubDirFS returns file system that represents sub-directory in a wrapped file system
Types ¶
type RandomizedTempPaths ¶ added in v2.6.0
type RandomizedTempPaths struct {
// contains filtered or unexported fields
}
RandomizedTempPaths allows generating and memoizing random paths, each path being mapped to a specific key.
func NewRandomizedTempPaths ¶ added in v2.6.0
func NewRandomizedTempPaths(root string) *RandomizedTempPaths
func (*RandomizedTempPaths) Add ¶ added in v2.6.0
func (p *RandomizedTempPaths) Add(key string, value string)
func (*RandomizedTempPaths) GetPath ¶ added in v2.6.0
func (p *RandomizedTempPaths) GetPath(key string) (string, error)
GetPath generates a path for the given key or returns previously generated one.
func (*RandomizedTempPaths) GetPathIfExists ¶ added in v2.6.0
func (p *RandomizedTempPaths) GetPathIfExists(key string) string
GetPathIfExists gets a path for the given key if it exists. Otherwise, returns an empty string.
func (*RandomizedTempPaths) GetPaths ¶ added in v2.13.0
func (p *RandomizedTempPaths) GetPaths() map[string]string
GetPaths gets a copy of the map of paths.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.