Documentation ¶
Index ¶
Constants ¶
View Source
const FileNotFound = "File not found"
Variables ¶
View Source
var SkipFile = fmt.Errorf("This file must be skipped")
Functions ¶
Types ¶
type Config ¶
type Config struct { // Base destination directory Base string // FilenameFunc gets a path as in the source file and should return // the destination path (later to be joined with the base // directory) PathHandler PathHandlerFunc }
Config has settings for the file splitter
type HandlerFunc ¶
type HandlerFunc func(section, next string) (io.WriteCloser, error)
HandlerFunc is the func that is used by HandleSection
type NopWriteCloser ¶
func (*NopWriteCloser) Close ¶
func (n *NopWriteCloser) Close() error
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser keeps the state of the parsing accross different files
func (*Parser) HandleSection ¶
func (p *Parser) HandleSection(section string, handler HandlerFunc)
HandleSection adds a handler to a given slice of handlers for the section found
type PathHandlerFunc ¶
PathHandlerFunc says to the splitter what is the filename to be used for a given path
Click to show internal directories.
Click to hide internal directories.