utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorApp  = "app"
	ErrorUser = "user"
)

Error types

Variables

This section is empty.

Functions

func EnsureFolder

func EnsureFolder(path string) error

EnsureFolder creates a folder if it doesn't exist already

func ExitWithError

func ExitWithError(errType string, errMessage string, errData error)

ExitWithError prints and error then terminates the app

func IsRegularFile

func IsRegularFile(path string) (bool, error)

IsRegularFile returns true if the path is a file

func PathExists

func PathExists(path string) (bool, error)

PathExists returns true if the path exists on disk

func PromptPassphrase

func PromptPassphrase() (string, error)

PromptPassphrase prompts the user for a passphrase

Types

This section is empty.

Jump to

Keyboard shortcuts

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