cli

package
v0.0.0-...-c86c8fe Latest Latest
Warning

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

Go to latest
Published: May 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package cli provides utilities for working with the CLI

Index

Constants

This section is empty.

Variables

View Source
var Red = color.New(color.FgRed).SprintFunc()

Red is a function which makes a string red, ie. Red("danger")

View Source
var Yellow = color.New(color.FgYellow).SprintFunc()

Yellow is a function which makes a string yellow, ie. Yellow("warning")

Functions

func Exit

func Exit()

Exit exits the CLI with a success code

func ExitWithError

func ExitWithError(err error)

ExitWithError exits the CLI with an error code

func GetUserInput

func GetUserInput() (string, error)

GetUserInput prompts the user to enter input. If the user types "exit", the CLI will exit with a success code. If the user doesn't type anything, this function returns an error.

func WriteAssistantMessage

func WriteAssistantMessage(msg string)

WriteAssistantMessage prints a formatted message from the assistant

Types

This section is empty.

Jump to

Keyboard shortcuts

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