util

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSize

func GetSize() (width, height int)

func OpenCommand

func OpenCommand(url string) (*exec.Cmd, error)

func Pad

func Pad(str string, pad rune, length int, mode PadMode) string

func PadFormat

func PadFormat(input [][]PadSet) []string

func Pick

func Pick(max int) int

func StartProgram

func StartProgram(program string, url string)

func Truncate

func Truncate(s string, max int) string

Types

type PadMode

type PadMode int
const (
	LeftPad PadMode = iota
	RightPad
)

type PadSet

type PadSet struct {
	Str string
	Pad PadMode
}

func P

func P(str string, mode PadMode) *PadSet

Jump to

Keyboard shortcuts

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