wc

package
v0.0.0-...-70e5762 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2018 License: GPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Lines     = 1 << iota // count lines
	Words                 // count words
	Chars                 // count chars
	Bytes                 // count bytes
	MaxLength             // find max line length
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Counter

type Counter struct {
	TabWidth int64
	// contains filtered or unexported fields
}

func NewCounter

func NewCounter(opts uint8) *Counter

func (*Counter) Count

func (c *Counter) Count(r io.Reader) (res Results, err error)

type Results

type Results struct {
	Lines     int64
	Words     int64
	Chars     int64
	Bytes     int64
	MaxLength int64
}

Directories

Path Synopsis
internal
sys

Jump to

Keyboard shortcuts

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