termutil

package module
v0.0.0-...-009166a Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2015 License: MIT Imports: 3 Imported by: 168

README

go-termutil

This package exposes some very basic, useful functions:

Isatty(file *os.File) bool

This function will return whether or not the given file is a TTY, attempting to use native operations when possible. It wil fall back to using the isatty() function from unistd.h through cgo if on an unknown platform.

	GetPass(prompt string, prompt_fd, input_fd uintptr) ([]byte, error)

This function will print the prompt string to the file identified by prompt_fd, prompt the user for a password without echoing the password to the terminal, print a newline, and then return the given password to the user. NOTE: not yet tested on anything except Linux & OS X.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPass

func GetPass(prompt string, prompt_fd, input_fd uintptr) ([]byte, error)

func Isatty

func Isatty(fd uintptr) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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