Documentation
¶
Index ¶
- Constants
- func FormatCounts(counts *[]uint64, name string, cr bool, lf bool) *bytes.Buffer
- func OpenFile(namePtr *string) (string, *os.File)
- func PollCounts(name string, counts *[]uint64, interval time.Duration, done chan bool)
- func PrintCounts(counts *[]uint64, name string, cr bool, lf bool)
- func ProcessFile(namePtr *string, processors []Processor, totals *[]uint64, ...)
- func ProcessFiles(config *Config)
- func ProcessReader(reader io.Reader, processor Processor, count *uint64, total *uint64)
- func Run(version string)
- func ScanCount(scanner *bufio.Scanner, count *uint64, total *uint64)
- func ScanMaxLength(scanner *bufio.Scanner, count *uint64, total *uint64)
- type Config
- type Processor
- type ScanFunc
Constants ¶
View Source
const CARRIAGE_RETURN byte = 13
View Source
const COUNT_FORMAT string = "%8d"
View Source
const DEFAULT_INTERVAL int = 100
View Source
const LINE_FEED byte = 10
View Source
const SPACE byte = 32
Variables ¶
This section is empty.
Functions ¶
func FormatCounts ¶
func PollCounts ¶
func ProcessFile ¶
func ProcessFiles ¶
func ProcessFiles(config *Config)
func ProcessReader ¶
Types ¶
type Config ¶
type Config struct { Lines bool Words bool Chars bool Bytes bool MaxLineLength bool Files0From string Interval time.Duration Help bool Version bool Files []string // contains filtered or unexported fields }
func (*Config) PrintUsage ¶
func (c *Config) PrintUsage()
func (*Config) Processors ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.