Documentation
¶
Index ¶
- Constants
- func HTMLTable(tc TabbedConfig) func(string) (string, error)
- func JSONEscape(tc TabbedConfig) func(string) (string, error)
- func JSONUnescape(tc TabbedConfig) func(string) (string, error)
- func NewTabFixer(tabLen int) func(Gridder) (string, error)
- func SQLEscape(tabLen int) func(string) (string, error)
- func SQLInsert(tc TabbedConfig) func(Gridder) (string, error)
- func SQLUnescape(tabLen int) func(string) (string, error)
- type Gridder
- type PassThruGridder
- type TabbedConfig
- type TextSplitGridder
Constants ¶
View Source
const EndLine = "\n"
Variables ¶
This section is empty.
Functions ¶
func JSONEscape ¶
func JSONEscape(tc TabbedConfig) func(string) (string, error)
func JSONUnescape ¶
func JSONUnescape(tc TabbedConfig) func(string) (string, error)
Types ¶
type Gridder ¶
Gridder transforms into a grid of text fields.
This is a "hack" to deal with the original implementations of table parsers expecting the source to be TSV strings. Now when textutil is wrapped by another library, you can use the PassThruGridder to skip any string re-parsing issues
type PassThruGridder ¶
type PassThruGridder struct {
G [][]string
}
PassThruGridder "passes through" its grid
func (PassThruGridder) Grid ¶
func (pg PassThruGridder) Grid() (grid [][]string, maxColLengths []int)
type TabbedConfig ¶
type TextSplitGridder ¶
TextSplitGridder splits a single long string of text into records and fields in those records.
func (TextSplitGridder) Grid ¶
func (sg TextSplitGridder) Grid() (grid [][]string, maxColLengths []int)
Click to show internal directories.
Click to hide internal directories.