scanner

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package scanner implements a scanner with methods to prompt for user input.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner represents an active scanner.

func New

func New() *Scanner

New creates a new scanner.

func (*Scanner) PromptLine

func (s *Scanner) PromptLine(prompt string, defaultValue string) string

PromptLine prompts the user for a single line of input.

func (*Scanner) PromptMultiline

func (s *Scanner) PromptMultiline(prompt string, defaultValue []string) []string

PromptMultiline prompts the user for multiline input.

func (*Scanner) PromptYesNo

func (s *Scanner) PromptYesNo(prompt string, defaultValue bool) bool

PromptYesNo prompts the user for yes/no input.

Jump to

Keyboard shortcuts

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