utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package utils holds utility functions like print formatting or conversion functions

Package utils holds utility functions like print formatting or conversion functions

Package utils holds utility functions like print formatting or conversion functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterpolateArguments

func InterpolateArguments(rawLine string, command string) (string, error)

InterpolateArguments fills in an alias' placeholders ($#) with provided arguments TODO add alias_test.go unit tests

func LoadHistoryFile

func LoadHistoryFile() ([]string, error)

LoadHistoryFile attempts to read and return the history file from disk and parse it as new line delimited commands

func PrettyPrintQueryResults

func PrettyPrintQueryResults(results []map[string]string)

PrettyPrintQueryResults prints a given []result map set to standard out taking into consideration the current state.go's print mode

func UpdateHistoryFile

func UpdateHistoryFile(line string) error

UpdateHistoryFile attempts to write a new line entry to the history file

Types

type Rows

type Rows = []map[string]string

Jump to

Keyboard shortcuts

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