etc

package
v0.0.0-...-ac2752c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JsonEncoder = func(input interface{}) ([]byte, error) {
	return json.Marshal(input)
}
View Source
var StringEncoder = func(input interface{}) ([]byte, error) {
	return []byte(fmt.Sprintf("%s", input)), nil
}

Functions

func ArgsToFlagsMap

func ArgsToFlagsMap(args []string) map[string]string

func FileExists

func FileExists(path string) bool

func PrettyPrintJson

func PrettyPrintJson(m map[string]interface{})

func PrintError

func PrintError(message string, args ...interface{})

func PrintInfo

func PrintInfo(message string, args ...interface{})

func PrintResponse

func PrintResponse(message string, args ...interface{})

func PrintSuccess

func PrintSuccess(message string, args ...interface{})

func ReadFile

func ReadFile(path string) (string, error)

func WriteFile

func WriteFile(path string, data interface{}, encoder func(interface{}) ([]byte, error)) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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