util

package
v38.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: MIT Imports: 2 Imported by: 10

Documentation

Overview

Package util contains shared functions used by several packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIDescription

func CLIDescription(s string) (r string)

func WorkerPool

func WorkerPool(ws int, fn func(int))

WorkerPool will launch ws workers at the same time and wait for them all to complete.

func WrapToMargin

func WrapToMargin(s string, width int) (r string)

Types

type CLIStringSlice

type CLIStringSlice []string

CLIStringSlice is used to accept multiple values from a CLI argument like:

-foo value1 -foo value2

Usage:

var foos CLIStringSlice
flag.Var(&foos, "foo", "Some description for this param.")

func (*CLIStringSlice) Set

func (i *CLIStringSlice) Set(value string) error

func (*CLIStringSlice) String

func (i *CLIStringSlice) String() string

Jump to

Keyboard shortcuts

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