Documentation ¶ Index ¶ func LineCount(fileName string) (int, error) type LineCounter func (lc *LineCounter) Write(data []byte) (int, error) Examples ¶ LineCount Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func LineCount ¶ func LineCount(fileName string) (int, error) Example ¶ fmt.Println(LineCount("testdata/road.txt")) fmt.Println(LineCount("testdata/aow.txt.gz")) Output: 8 <nil> 6982 <nil> Types ¶ type LineCounter ¶ type LineCounter int func (*LineCounter) Write ¶ func (lc *LineCounter) Write(data []byte) (int, error) Source Files ¶ View all Source files wc.go Click to show internal directories. Click to hide internal directories.