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: 314 modules, 328 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

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
⌂ 换网址