util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMasterPasswordMustNotBeEmpty = errors.New("master password must not be empty")
	ErrMasterPasswordIncorrect      = errors.New("master password incorrect")
)

Functions

func CopyToClipboard

func CopyToClipboard(s string)

CopyToClipboard - uses ANSI OSC 52 to copy text to clipboard, it may not work on some terminals (see https://github.com/ojroques/vim-oscyank/blob/main/README.md).

func NewUUIDV4

func NewUUIDV4() (string, error)

nolint: gomnd

func ReadLine

func ReadLine() (string, error)

ReadLine - read from stdin and handles backspace. Inspired from https://gist.github.com/artyom/a59e2707976124f387f5

func ReadPassword

func ReadPassword() (string, error)

ReadPassword - read password from stdin and handle CTRL+C to restore. Inspired from https://groups.google.com/g/golang-nuts/c/DCl8xUJMJJ0.

func RenderTable

func RenderTable(w io.Writer, headerColumns []string, lines [][]string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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