input

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitReadlineHistory

func InitReadlineHistory(rl *readline.Instance, history []string)

InitReadlineHistory 初始化 readline 实例的历史记录 Note: ergochat/readline uses SaveToHistory instead of SaveHistory

func NewReadline

func NewReadline(prompt string) (*readline.Instance, error)

NewReadline 创建持久化的 readline 实例 用于需要多次读取输入并保持历史记录的场景

func ReadLine

func ReadLine(prompt string) (string, error)

ReadLine 读取一行输入(支持中文)

func ReadLineWithHistory

func ReadLineWithHistory(prompt string, history []string) (string, error)

ReadLineWithHistory 读取一行输入(支持历史记录) 注意:每次调用创建新的 readline 实例,适用于一次性读取

Types

This section is empty.

Jump to

Keyboard shortcuts

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