cli

package
v0.0.0-...-9a81cb1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cli contains all the command line interactions features

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	Book   book.Book
	Reader *readline.Instance
	Config config.Config
	I18n   *i18n.I18n
}

Cli structure represents the command line interface

func NewInstance

func NewInstance(book book.Book, conf config.Config) (cli Cli, err error)

NewInstance returns an instance of the Cli structure

func (*Cli) Create

func (instance *Cli) Create()

Create prompts the user to add a contact using the command line interface

func (*Cli) Delete

func (instance *Cli) Delete()

Delete prompts the user to remove a contact using the command line interface

func (Cli) List

func (instance Cli) List()

List displays all the contacts using the command line interface

func (Cli) Menu

func (instance Cli) Menu()

Menu displays and loops over the menu in the command line interface

Jump to

Keyboard shortcuts

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