password

package
v0.0.0-...-e7ae2a8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(password *string, readStdIn bool, prompt string) (err error)

Read will use one of several methods to get a password from a user password is an existing password if set. This is return unmodified if passed in with a value. readStdIn is true if the password should be read from standard in prompt is what the console prompt should be if it should be read from the console from the user

func ReadFromConsole

func ReadFromConsole(prompt string) (string, error)

ReadFromConsole write the prompt to the console and then will read the password from the user console without echoing the password to the console

func ReadFromStdIn

func ReadFromStdIn() (string, error)

ReadFromStdIn reads from os.Stdin and trims any CR & LF characters as well as any spaces around the input. This method allows passwords to be passed to the CLI with commands like:

<Windows>
  echo mypassword | hpecli ilo login --host 1.1.1.1 -u admin --password-stdin

Types

This section is empty.

Jump to

Keyboard shortcuts

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