mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
main: DON'T PANIC
This commit is contained in:
parent
a6f9b61459
commit
af03fe9014
7
main.go
7
main.go
|
@ -43,10 +43,6 @@ func main() {
|
|||
cmdNum++
|
||||
name := fmt.Sprintf("<tty %d>", cmdNum)
|
||||
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
prompt := func() string {
|
||||
return util.Getwd() + "> "
|
||||
}
|
||||
|
@ -59,7 +55,8 @@ func main() {
|
|||
if lr.EOF {
|
||||
break
|
||||
} else if lr.Err != nil {
|
||||
panic(lr.Err)
|
||||
fmt.Println("Editor error:", lr.Err)
|
||||
fmt.Println("My pid is", os.Getpid())
|
||||
}
|
||||
|
||||
n, pe := parse.Parse(name, lr.Line)
|
||||
|
|
Loading…
Reference in New Issue
Block a user