utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteFunc

func ExecuteFunc(fname string, line chan string) func() error

func InterruptFunc

func InterruptFunc(msg string) func(err error)

func RenderTable

func RenderTable(tableData GenericDictHeap, headers []string)

Renders any data in a nice tabular manner

Types

type GenericDict

type GenericDict struct {
	Key   string `json:"Key"`
	Value int    `json:"Value"`
}

GenericDict represents a generic map represented as key, value

type GenericDictHeap

type GenericDictHeap []GenericDict

func (GenericDictHeap) Len

func (g GenericDictHeap) Len() int

func (GenericDictHeap) Less

func (g GenericDictHeap) Less(i, j int) bool

func (*GenericDictHeap) Pop

func (g *GenericDictHeap) Pop() interface{}

func (*GenericDictHeap) Push

func (g *GenericDictHeap) Push(x interface{})

func (GenericDictHeap) Swap

func (g GenericDictHeap) Swap(i, j int)

func (GenericDictHeap) Take

func (g GenericDictHeap) Take(count int) GenericDictHeap

func (GenericDictHeap) ToJson

func (g GenericDictHeap) ToJson(out io.Writer) error

Write the generated json to output

Jump to

Keyboard shortcuts

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