utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const TABLE_HEADER_TAG = "header"

Variables

This section is empty.

Functions

func GenerateTable

func GenerateTable(tables []TableStruct, fields []string)

Geneates a table using a list of TableStruct & struct field names in the report

func GetHeaderTag

func GetHeaderTag(v reflect.Value, fieldName string) (string, error)

func TableRow

func TableRow(table TableStruct) (map[string]string, map[string]string)

Returns a row and a mapping of struct field name to header names

Types

type TableStruct

type TableStruct interface {
	GetHeader(string) (string, error)
}

Jump to

Keyboard shortcuts

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