util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package util implements utility routines for printing messages, warnings, and errors.

Index

Constants

This section is empty.

Variables

View Source
var Debug bool
View Source
var Verbose bool

Functions

func LoadStringPairs added in v0.2.0

func LoadStringPairs(csvPath string) ([][2]string, error)

LoadStringPairs loads string pairs from a CSV file, where each line is two comma separated strings.

func PrintDebug added in v0.2.0

func PrintDebug(format string, args ...interface{})

PrintDebug prints a message to stdout if the Debug flag is set.

func PrintError

func PrintError(err error, format string, args ...interface{})

PrintError prints a error message to stderr.

func PrintFatalError

func PrintFatalError(err error, format string, args ...interface{})

PrintFatalError prints a error message to stderr and exits.

func PrintMessage

func PrintMessage(format string, args ...interface{})

PrintMessage prints a message to stdout.

func PrintVerbose added in v0.2.0

func PrintVerbose(format string, args ...interface{})

PrintVerbose prints a message to stdout if either the Verbose or Debug flag is set.

func PrintWarning

func PrintWarning(format string, args ...interface{})

PrintWarning prints a warning to stderr.

Types

This section is empty.

Jump to

Keyboard shortcuts

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