ltsview

package module
v0.0.0-...-d3ea5ad Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2015 License: BSD-3-Clause Imports: 6 Imported by: 0

README

go-ltsview build status

A LTSV viewer written in Go.

Installation

$ go get -u github.com/nabeken/go-ltsview/ltsview

Usage

$ ltsview --help
Usage of ltsview:
  -i="": Specify comma-separated keys to ignore
  -k="": Specify comma-separated keys to show
  -n=false: Set to true to disable colorized outputs

Demo

demo

(This demo is brought to you by ttygif.)

Inspired by

Author

TANABE Ken-ichi

LICENSE

See LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseKeysByFlag

func ParseKeysByFlag(flag string) map[string]struct{}

func PrintLine

func PrintLine(w Writer, k, v string)

func PrintSep

func PrintSep(w SeparatorWriter)

func SortKeys

func SortKeys(record map[string]string) []string

Types

type ColorableWriter

type ColorableWriter struct {
	io.Writer
}

func (*ColorableWriter) Write

func (w *ColorableWriter) Write(p []byte) (int, error)

func (*ColorableWriter) WriteSeparator

func (w *ColorableWriter) WriteSeparator(sep string) (int, error)

type LTSView

type LTSView struct {
	Reader io.Reader
	Writer Writer

	Keys  map[string]struct{}
	Ikeys map[string]struct{}
}

func (*LTSView) Start

func (v *LTSView) Start()

type SeparatorWriter

type SeparatorWriter interface {
	WriteSeparator(sep string) (int, error)
}

type Writer

type Writer interface {
	io.Writer
	SeparatorWriter
}

func NewWriter

func NewWriter(w io.Writer) Writer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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