speakeasy – github.com/bgentry/speakeasy Index | Files | Directories

package speakeasy

import "github.com/bgentry/speakeasy"

Index

Constants

const ENABLE_ECHO_INPUT = 0x0004

SetConsoleMode function can be used to change value of ENABLE_ECHO_INPUT: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx

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.

Source Files

speakeasy.go speakeasy_windows.go

Directories

PathSynopsis
example
Version
v0.1.0
Published
Apr 17, 2017
Platform
windows/amd64
Imports
5 packages
Last checked
now

Tools for package owners.