speakeasy

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 7 Imported by: 532 modules, 671 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Speakeasy

This package provides cross-platform Go (#golang) helpers for taking user input from the terminal while not echoing the input back (similar to getpasswd). The package uses syscalls to avoid any dependence on cgo, and is therefore compatible with cross-compiling.

GoDoc

Unicode

Multi-byte unicode characters work successfully on Mac OS X. On Windows, however, this may be problematic (as is UTF in general on Windows). Other platforms have not been tested.

License

The code herein was not written by me, but was compiled from two separate open source packages. Unix portions were imported from gopass, while Windows portions were imported from the CloudFoundry Go CLI's Windows terminal helpers.

The license for the windows portion has been copied exactly from the source (though I attempted to fill in the correct owner in the boilerplate copyright notice).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ask

func Ask(prompt string) (password string, err error)

Ask the user to enter a password with input hidden. prompt is a string to display before the user's input. Returns the provided password, or an error if the command failed.

func FAsk

func FAsk(wr io.Writer, prompt string) (password string, err error)

FAsk is the same as Ask, except it is possible to specify the file to write the prompt to. If 'nil' is passed as the writer, no prompt will be written.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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