Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is a helper for reading a string table previously serialized by a Writer.Write call.
func NewReader ¶
func NewReader(r *slicereader.Reader) *Reader
NewReader creates a stringtab.Reader to read the contents of a string table from 'r'.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer implements a string table writing utility.
func (*Writer) Freeze ¶
func (stw *Writer) Freeze()
Freeze sends a signal to the writer that no more additions are allowed, only lookups of existing strings (if a lookup triggers addition, a panic will result). Useful as a mechanism for "finalizing" a string table prior to writing it out.
func (*Writer) InitWriter ¶
func (stw *Writer) InitWriter()
InitWriter initializes a stringtab.Writer.
func (*Writer) Lookup ¶
Lookup looks up string 's' in the writer's table, adding a new entry if need be, and returning an index into the table.