suppress error if configuration file not exists

This commit is contained in:
Gokcehan 2016-08-17 22:35:18 +03:00
parent 09ebc54d20
commit 2f224240bf

View File

@ -29,6 +29,9 @@ func client() {
nav := newNav(ui.wins[0].h)
app := &App{ui, nav}
if _, err := os.Stat(gConfigPath); err == nil {
log.Printf("reading configuration file: %s", gConfigPath)
rcFile, err := os.Open(gConfigPath)
if err != nil {
msg := fmt.Sprintf("opening configuration file: %s", err)
@ -45,6 +48,7 @@ func client() {
}
// TODO: parser error check
}
app.ui.draw(app.nav)