forked from sloum/bombadillo
Go directly to a URL when passed on the command line. Closes #8
This commit is contained in:
parent
9459c0c063
commit
4b547dc76a
23
main.go
23
main.go
|
@ -429,19 +429,20 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow := screen.Windows[0]
|
mainWindow := screen.Windows[0]
|
||||||
firstLoad := true
|
|
||||||
|
if len(os.Args) > 1 {
|
||||||
|
err = goToURL(os.Args[1])
|
||||||
|
} else {
|
||||||
|
err = goHome()
|
||||||
|
}
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
displayError(err)
|
||||||
|
} else {
|
||||||
|
updateMainContent()
|
||||||
|
}
|
||||||
|
|
||||||
for {
|
for {
|
||||||
if firstLoad {
|
|
||||||
firstLoad = false
|
|
||||||
err := goHome()
|
|
||||||
|
|
||||||
if err == nil {
|
|
||||||
updateMainContent()
|
|
||||||
}
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
c := cui.Getch()
|
c := cui.Getch()
|
||||||
switch c {
|
switch c {
|
||||||
case 'j', 'J':
|
case 'j', 'J':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user