Browse Source

change error messages

master
Joop Kiefte 9 months ago
parent
commit
c56acf2fba
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      main.go

+ 2
- 2
main.go View File

@ -14,7 +14,7 @@ func main() {
rand.Seed(time.Now().UnixNano())
db, err := sql.Open("sqlite", "prayers.db")
if err != nil {
fmt.Println("put prayers.db alongside the binary: "+ err.Error())
fmt.Println("error loading database driver: "+ err.Error())
os.Exit(1)
}
langcode := "en"
@ -23,7 +23,7 @@ func main() {
}
rows, err := db.Query("select text, author from prayers where language = ?", langcode)
if err != nil {
fmt.Println("database query failed: " +err.Error())
fmt.Println("database query failed (is prayers.db in your current directory?): " +err.Error())
os.Exit(2)
}
var prayers []string


Loading…
Cancel
Save