util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleDateArgs

func HandleDateArgs(date *string, nrecords *int, defaultN int, args ...string) error

HandleDateArgs handles non flag input arguments mostly handle nrecords only, where n could be days, weeks, or months

func InterfaceSlice

func InterfaceSlice(slice interface{}) []interface{}

InterfaceSlice converts a list of struct to list of interface

func ParseDateInput

func ParseDateInput(s, freq string) (string, error)

ParseDateInput parse the input for past n days, or actual day string in YYYY-MM-DD format result depends on freq, daily, monthly -> 2021-03-01, weekly -> start from monday

func PrintTable

func PrintTable(data []interface{}, headers, ignore []string, colMerge int) error

PrintTable prints the table with interface

Types

This section is empty.

Jump to

Keyboard shortcuts

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