Documentation
¶
Overview ¶
Example (History) ¶
_, err := LoadHistory("notexist") fmt.Println(err) _, err = LoadHistory("/dev/null/notvalid") fmt.Println(err) err = SaveHistory(nil, "/dev/null/notvalid") fmt.Println(err) f, err := ioutil.TempFile("", "test") if err != nil { fmt.Println(err) return } fname := f.Name() f.Close() defer os.Remove(fname) err = SaveHistory(nil, fname) fmt.Println(err) _, err = LoadHistory(fname) fmt.Println(err)
Output: <nil> open /dev/null/notvalid: not a directory open /dev/null/notvalid: not a directory <nil> <nil>
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadHistory ¶
LoadHistory loadsa a history from a file loaded from the specified path. The file must be in the same format as used by libedit.
func SaveHistory ¶
SaveHistory saves a history to the specified file. The file will be written in the same format as used by libedit.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.