Пример #1
0
func setHistoryCapacity(capacity int) error {
	res := C.linenoiseHistorySetMaxLen(C.int(capacity))
	if res != 1 {
		return errors.New("Could not set history max len.")
	}
	return nil
}
Пример #2
0
func HistorySetMaxLen(length int) {
	C.linenoiseHistorySetMaxLen(C.int(length))
	return
}