prompt

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 7 Imported by: 0

README

cliPrompt

Small Module for providing basic CLI prompts in golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Credentials

func Credentials(label string) string

Prompts for user input, and securely prompts for password if "Password:" is the given label. Required for passwords as it's grabbing the Stdin and processing. Can't use ReadPassword standalone

func List

func List(label string) []string

Prompt for user input and return an array of strings. Each line is its own string. To exit the function do an empty return (hit enter on a new line).

func Pause

func Pause()

This functions whole job is to allow you to stop at the end of a program and digest the output before closing. Press Enter to continue...

func Scan

func Scan(label string) string

Obligitory wrapper for fmt.Scan(). No need to use a weird pointer, the returned value is the user string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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