app

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTermWidth = 80
)

Variables

This section is empty.

Functions

func Run

func Run(c *Config) int

Types

type Config

type Config struct {
	Filepath  string
	IsChop    bool
	IsDos     bool
	IsIndent  bool
	IsMono    bool
	IsStats   bool
	IsStdin   bool
	IsTable   bool
	IsVersion bool
	TermWidth int
	Widther   cmn.Widther
	Out       io.Writer
	OutErr    io.Writer
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) AcquireBoxChars

func (c *Config) AcquireBoxChars() cmn.BoxChars

func (*Config) AcquirePrinter

func (c *Config) AcquirePrinter() Printer

func (*Config) AcquireScanner

func (c *Config) AcquireScanner() (scanner *bufio.Scanner, closer func(), _ error)

func (*Config) ApplyFlags

func (c *Config) ApplyFlags()

func (*Config) Init

func (c *Config) Init(fnTermSize TermSizeFunc)

type Printer

type Printer interface {
	Print(data *processor.Result)
	PrintTo(output io.Writer, data *processor.Result)
}

type TermSizeFunc

type TermSizeFunc func() (cols int, lines int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL