getpass

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: BSD-3-Clause Imports: 3 Imported by: 4

README

getpass

GoDoc

This repository provides a Go package to read passwords from the terminal with echo disabled. This implementation relies on the x/sys/unix package to read and write terminal settings.

Documentation

Overview

Package getpass supports reading text from a terminal with echo disabled, suitable for prompting a user for a passphrase.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prompt

func Prompt(prompt string) (string, error)

Prompt prints the prompt string to TTY then calls FReadline on it.

func Readline

func Readline() (string, error)

Readline is a shorthand for FReadline using the TTY.

func TTY

func TTY() (*os.File, error)

TTY opens the controlling terminal of the current process if possible.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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