mirror of https://github.com/Hilbis/Hilbish
style: put all vars in 1 var()
parent
94f0ccf9f6
commit
428db24831
25
main.go
25
main.go
|
@ -2,35 +2,36 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
hooks "hilbish/golibs/bait"
|
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"os/user"
|
"os/user"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
hooks "hilbish/golibs/bait"
|
||||||
|
|
||||||
"github.com/akamensky/argparse"
|
"github.com/akamensky/argparse"
|
||||||
"github.com/bobappleyard/readline"
|
"github.com/bobappleyard/readline"
|
||||||
lua "github.com/yuin/gopher-lua"
|
"github.com/yuin/gopher-lua"
|
||||||
"golang.org/x/term"
|
"golang.org/x/term"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version = "0.3.2"
|
const version = "0.3.2"
|
||||||
|
|
||||||
var l *lua.LState
|
var (
|
||||||
|
l *lua.LState
|
||||||
|
|
||||||
// User's prompt, this will get set when lua side is initialized
|
// User's prompt, this will get set when lua side is initialized
|
||||||
var prompt string
|
prompt string
|
||||||
var multilinePrompt = "> "
|
multilinePrompt = "> "
|
||||||
|
|
||||||
// Map of builtin/custom commands defined in the commander lua module
|
commands = map[string]bool{}
|
||||||
var commands = map[string]bool{}
|
aliases = map[string]string{}
|
||||||
|
|
||||||
// Command aliases
|
bait hooks.Bait
|
||||||
var aliases = map[string]string{}
|
homedir string
|
||||||
var bait hooks.Bait
|
running bool
|
||||||
var homedir string
|
)
|
||||||
var running bool
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
homedir, _ = os.UserHomeDir()
|
homedir, _ = os.UserHomeDir()
|
||||||
|
|
Loading…
Reference in New Issue