@@ -1,24 +1,23 @@
1−package main
1+package linenoise
22
33/*
4−#include <stdlib.h>
54#include <linenoise.h>
5+#include <stdlib.h>
66
7−void linenoise_setup();
7+void linenoise_setup();
88
99
1010*/
1111import "C"
1212
1313import (
14− "unsafe"
1514 "fmt"
15+ "unsafe"
1616)
1717
1818type Completer func(line string) []string
1919type Hinter func(line string) string
2020
21−
2221var completer Completer
2322var hinter Hinter
2423
@@ -52,7 +51,7 @@ func linenoiseHintsStub(input *C.char, color *C.int, bold *C.int) *C.char {
5251 return C.CString(hinter(C.GoString(input)))
5352}
5453
55−func Linenoise(prompt string) (string,error) {
54+func Linenoise(prompt string) (string, error) {
5655 C.linenoise_setup()
5756 cprompt := C.CString(prompt)
5857 defer C.free(unsafe.Pointer(cprompt))
@@ -78,4 +77,3 @@ func LinenoiseSetCompleter(newCompleter Completer) {
7877func LinenoiseSetHinter(newHinter Hinter) {
7978 hinter = newHinter
8079}
81−