colw

package
v0.34.0-test1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package colw lays out columns for display of a list when you don't know ahead of time how many columns should exist. Kind of like what ls does.

Index

Constants

This section is empty.

Variables

View Source
var ErrDoesNotFit = errors.New("items do not fit")

ErrDoesNotFit is returned when the items do not fit in the supplied width. The only way this happens is if there is at least one item larger than the width less padding. Otherwise, you would get one column taking up all the width.

Functions

func Write

func Write(w io.Writer, in []string, width, pad int) error

Write writes the list of strings to the given writer with padding and newlines according to Layout

Types

This section is empty.

Jump to

Keyboard shortcuts

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