Documentation
¶
Index ¶
- func PrintTextStats(text string, w io.Writer)
- func PrintWordFrequency(text string, w io.Writer)
- func Run(opts ...Option) error
- func SortLines(text string, numeric, descending, ignoreCase bool, field int, w io.Writer)
- type Config
- type Option
- func WithDescending(descending bool) Option
- func WithIgnoreCase(ignoreCase bool) Option
- func WithInput(data []byte) Option
- func WithMode(mode string) Option
- func WithNumeric(numeric bool) Option
- func WithPattern(pattern string) Option
- func WithReplacement(repl string) Option
- func WithSortField(field int) Option
- func WithStdout(w io.Writer) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintTextStats ¶
PrintTextStats prints text statistics.
func PrintWordFrequency ¶
PrintWordFrequency prints top 30 words by frequency.
Types ¶
type Config ¶
type Config struct {
Mode string
Pattern string
Replacement string
Numeric bool
Descending bool
IgnoreCase bool
SortField int
Input []byte
Stdout io.Writer
}
Config holds configuration for the transform command.
type Option ¶
type Option func(*Config)
Option configures a Config.
func WithDescending ¶
func WithIgnoreCase ¶
func WithNumeric ¶
func WithPattern ¶
func WithReplacement ¶
func WithSortField ¶
func WithStdout ¶
Click to show internal directories.
Click to hide internal directories.