input

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: Apache-2.0, BSD-3-Clause, MIT Imports: 11 Imported by: 0

Documentation

Overview

Package input provides helpers to work with user inputs

Package input provides helpers to work with user inputs

Index

Constants

This section is empty.

Variables

View Source
var MaxSecretSize = 4 * 1024

MaxSecretSize specifies how long input read from stdin can be

Functions

func ReadFile

func ReadFile(file string) (plainText []byte, err error)

ReadFile returns a file as bytes

func ReadSecret

func ReadSecret(prompt string, maskInput bool) (plainText []byte, err error)

ReadSecret returns the contents of Stdin as bytes, masking input optionally if reading from a TTY

func SelectionFromList

func SelectionFromList(list []string, prompt string, takeMultiple bool) (output []string, err error)

SelectionFromList returns a number of values from `list`

Types

This section is empty.

Jump to

Keyboard shortcuts

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