Documentation
¶
Overview ¶
Package idemvfs implements a virtual file system that guarantees idempotency of modification time when a file's content is identical to the stored state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmptyIdentifier ¶
type EmptyIdentifier struct{}
EmptyIdentifier implements Identifier, it always returns false.
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
FileSystem implements the http.FileSystem interface. It returns idempotent modification times if the actual file's identity matches with the information returned by Identifier.
func NewFileSystem ¶
func NewFileSystem(fs http.FileSystem, i Identifier) *FileSystem
NewFileSystem creates a new FileSystem.
type Identifier ¶
Identifier returns the identity of a file given its name. It should return false if the file is unknown.
type Options ¶
type Options struct { // Filename of the generated Go code output (including the extension). // If left empty, it defaults to "{{toLower .VariableName}}.go". Filename string // PackageName is the name of the package in the generating program. // If left empty, it default to "name". PackageName string // VariableName is the name of the Identifier variable in the generating program. // If left empty, it default to "identifier". VariableName string }
Options for the Generate function.
Click to show internal directories.
Click to hide internal directories.