fancy

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Reading from stdin with readline support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Input

func Input(prompt string) string

Reads a line from stdin using the readline library. It also prints a prompt if specified. This one doesn't return the error.

func InputLinuxOnly

func InputLinuxOnly(prompt string) string

On Linux, it uses the fancy readline library. On Windows I had problems with the readline library in "cmd", thus on non-Linux systems we fall back to the normal Input() function. I couldn't test it on Mac, so feel free to improve this function.

func InputWithError

func InputWithError(prompt string) (string, error)

Reads a line from stdin using the readline library. It also prints a prompt if specified. This one returns the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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