help

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultChildOffset int    = 4
	DefaultTipOffset   int    = 4 //
	DefaultValueType   string = "unknown"
	DefaultSortPrint   bool   = true
)

Functions

func FormatClamp

func FormatClamp(head, tail string) func(string) string

func FormatHeader

func FormatHeader(head string) func(string) string

func FormatNone

func FormatNone(raw string) string

Types

type Distance

type Distance struct {
	// contains filtered or unexported fields
}

func NewDistance

func NewDistance() Distance

func (*Distance) ChildOffseth

func (distance *Distance) ChildOffseth() int

func (*Distance) MaxKeyLength

func (distance *Distance) MaxKeyLength() int

func (*Distance) MaxValueTypeLength

func (distance *Distance) MaxValueTypeLength() int

func (*Distance) TipOffset

func (distance *Distance) TipOffset() int

func (*Distance) UpdateTip

func (distance *Distance) UpdateTip(name, kind string)

type Section

type Section struct {
	// contains filtered or unexported fields
}

func NewSection

func NewSection(name string, usetip string, distance *Distance) *Section

func (*Section) AddSection

func (section *Section) AddSection(newSection *Section)

func (*Section) AddTip

func (section *Section) AddTip(name, kind, tips, value string)

func (*Section) PrintSection

func (section *Section) PrintSection(w io.Writer, format func(string) string)

func (*Section) PrintSectionWithOffset

func (section *Section) PrintSectionWithOffset(w io.Writer, offset int, format func(string) string)

type Tip

type Tip struct {
	Name         string
	ValueType    string
	TipStr       string
	DefaultValue string
}

func (Tip) Fprint

func (tip Tip) Fprint(w io.Writer, offset int, keyLength int, typeLength int)

Jump to

Keyboard shortcuts

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