I want to do autocomplete my commands when press "TAB" key "\t" and execute command when press "ENTER" key "? ". This code for example:
package main
import (
"bufio"
"fmt"
)
func main() {
reader := bufio.NewReader(os.Stdin)
command, err := reader.ReadString('
')
if err != nil {
fmt.Printf("%s
", err)
} else {
fmt.Printf("%s
", command)
}
}