ccwc

package module
v0.0.0-...-86a9ba6 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

README

ccwc

Go Reference Go Report Card Coveralls

GitHub license

Summary

ccwc is a simplified clone of wc written in Go.

Usage

First, build the CLI application.

# `git clone` and `cd` to the ccwc repository folder first
make build_cli

Then use the c, l, w and/or m flags to count number of bytes, lines, words, and characters in test.txt.

./dist/ccwc -c test.txt # Count bytes
./dist/ccwc -l test.txt # Count lines
./dist/ccwc -w test.txt # Count words
./dist/ccwc -m test.txt # Count characters

Piping in from standard input is also supported.

cat test.txt | ./dist/ccwc -l

Documentation

Overview

Package ccwc is a simplified clone of wc written in Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Counts

func Counts(content []byte) (string, string, string, string)

Counts computes number of bytes, lines, words, and characters in content

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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