pcsliner

package
v3.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PCSLiner

type PCSLiner struct {
	State  *liner.State
	Config *linerConfig
	// contains filtered or unexported fields
}

PCSLiner 封装 *liner.State, 提供更简便的操作

func NewLiner

func NewLiner() *PCSLiner

NewLiner 返回 *PCSLiner, 默认设置允许 Ctrl+C 结束

func (*PCSLiner) Close

func (pl *PCSLiner) Close() error

Close 关闭服务

func (*PCSLiner) DoWriteHistory

func (pl *PCSLiner) DoWriteHistory() error

DoWriteHistory 执行写入历史

func (*PCSLiner) Pause

func (pl *PCSLiner) Pause() error

Pause 暂停服务

func (*PCSLiner) Resume

func (pl *PCSLiner) Resume()

Resume 恢复服务

func (*PCSLiner) SetHistory

func (pl *PCSLiner) SetHistory(filePath string) (err error)

SetHistory 设置历史记录保存文件

func (*PCSLiner) SetMainCompleter

func (pl *PCSLiner) SetMainCompleter(mc func(line string) []string)

Jump to

Keyboard shortcuts

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