Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotSeqfile = errors.New("not a sequence file") ErrFrameExists = errors.New("frame exists") ErrNegativeFrame = errors.New("nagative frame") )
var ( FmtSharp = func(pre, digits, post string) string { return pre + strings.Repeat("#", len(digits)) + post } FmtDollarF = func(pre, digits, post string) string { return pre + "$F" + strconv.Itoa(len(digits)) + post } FmtPercentD = func(pre, digits, post string) string { return pre + "%0" + strconv.Itoa(len(digits)) + "d" + post } )
Fmt{Sharp, DollarF, PrecentD} are pre-defined formatter, that covers most user's need.
var DefaultSplitter = NewSplitter(reDefaultSplit)
DefaultSplitter is a default splitter for this package.
User could create their own splitter. See NewSplitter.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
A Manager is a sequence manager.
func NewManager ¶
NewManager creates a new sequence manager.
func (*Manager) Add ¶
Add adds a file to the manager.
If the file's sequence is not exist yet, it will create a new sequence automatically.
type Range ¶
Range is a contiguous frame range, which includes Max frame.
type Seq ¶
type Seq struct {
// contains filtered or unexported fields
}
A Seq is a frame sequence. It does not hold a sequence name.
func (*Seq) AddFrame ¶
AddFrame adds a frame into sequence.
It treats negative frames are invalid. So returns ErrNegativeFrame when it takes a negative frame.
type Splitter ¶
type Splitter struct {
// contains filtered or unexported fields
}
Splitter is a file name splitter.
func NewSplitter ¶
NewSplitter creates a new splitter.
Splitter assumes it's regular expression could catch sequence file name and groups the file name into 3 parts (pre, digits, post). When it does not match, the file will treated as non-sequece file.
Note: If the regular expression does not have 3 sub groups, it will panic.