This commit is contained in:
Junegunn Choi
2015-08-02 13:06:15 +09:00
parent dea60b11bc
commit 634670e3ea
7 changed files with 14 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import (
"strings"
)
// History struct represents input history
type History struct {
path string
lines []string
@@ -15,6 +16,7 @@ type History struct {
cursor int
}
// NewHistory returns the pointer to a new History struct
func NewHistory(path string, maxSize int) (*History, error) {
fmtError := func(e error) error {
if os.IsPermission(e) {