Documentation ¶
Index ¶
- Variables
- func CountBlocks(r io.Reader, sep []byte) (int, error)
- func EscapeNTB(st string, bar bool) string
- func JoinByBarEscapeNTB(parts []string) string
- func PluginNames() []string
- func ReadInfo(reader EntryReader, maxNonInfo int) (*StrOrderedMap, []*Entry, error)
- func RegisterPluginType1(p PluginType1)
- func RegisterPluginType2(p PluginType1)
- func SplitByBarUnescapeNTB(st string) []string
- func UnescapeNTB(st string, bar bool) string
- type DefiFormat
- type Entry
- type EntryHeap
- type EntryReader
- type Glossary
- type LimitedGlossary
- type Option
- type OptionType
- type PluginBase
- type PluginType1
- type PluginType2
- type ProgressBar
- type StrOrderedMap
- func (m *StrOrderedMap) Get(key string) (string, bool)
- func (m *StrOrderedMap) GetDefault(key string, defaultVal string) string
- func (m *StrOrderedMap) Items() [][2]string
- func (m *StrOrderedMap) Len() int
- func (m *StrOrderedMap) Pop(key string) (string, bool)
- func (m *StrOrderedMap) Set(key string, value string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefiFormatPlain = DefiFormat('m') // plain text DefiFormatHTML = DefiFormat('h') // html DefiFormatXDXF = DefiFormat('x') // xdxf )
View Source
var Newline = []byte{'\n'}
Functions ¶
func JoinByBarEscapeNTB ¶
func PluginNames ¶
func PluginNames() []string
func ReadInfo ¶
func ReadInfo(reader EntryReader, maxNonInfo int) (*StrOrderedMap, []*Entry, error)
func RegisterPluginType1 ¶
func RegisterPluginType1(p PluginType1)
func RegisterPluginType2 ¶
func RegisterPluginType2(p PluginType1)
func SplitByBarUnescapeNTB ¶
SplitByBarUnescapeNTB: splits by "|" (and not "\\|") then unescapes Newline (\\n), Tab (\\t), Baskslash (\\) and Bar (\\|) in each part
func UnescapeNTB ¶
UnescapeNTB: unscapes Newline, Tab, Baskslash, and vertical Bar (if bar=True)
Types ¶
type EntryReader ¶
type EntryReader struct { Plug PluginType1 Next func() *Entry Filename string }
type Glossary ¶
type Glossary interface { LimitedGlossary Filename() string SetFilename(string) // DefaultDefiFormat() DefiFormat SetProgressBar(ProgressBar) Len() int Read(filename string, format string) error Write(filename string, format string) error }
func NewGlossary ¶
func NewGlossary() Glossary
type LimitedGlossary ¶
type LimitedGlossary interface { Info() *StrOrderedMap Iter() <-chan *Entry }
type OptionType ¶
type PluginBase ¶
type PluginBase interface { Name() string Description() string Extentions() []string ReadOptionTypes() []*OptionType WriteOptionsTypes() []*OptionType Count(filename string) (int, error) Write(glos LimitedGlossary, filename string, options ...Option) error }
type PluginType1 ¶
type PluginType1 interface { PluginBase Read(filename string, options ...Option) (func() *Entry, error) }
func PluginByName ¶
func PluginByName(name string) PluginType1
type PluginType2 ¶
type PluginType2 interface { PluginBase Read2(filename string, options ...Option) (<-chan *Entry, error) }
type ProgressBar ¶
type StrOrderedMap ¶
type StrOrderedMap struct {
// contains filtered or unexported fields
}
func NewStrOrderedMap ¶
func NewStrOrderedMap() *StrOrderedMap
func (*StrOrderedMap) GetDefault ¶
func (m *StrOrderedMap) GetDefault(key string, defaultVal string) string
func (*StrOrderedMap) Items ¶
func (m *StrOrderedMap) Items() [][2]string
func (*StrOrderedMap) Len ¶
func (m *StrOrderedMap) Len() int
func (*StrOrderedMap) Set ¶
func (m *StrOrderedMap) Set(key string, value string)
Set does not change the order of keys if the key is already present
Click to show internal directories.
Click to hide internal directories.