add comments to the examples

This commit is contained in:
2024-09-02 15:01:02 -06:00
parent 0ce907dbc1
commit 72df3adf0d

View File

@ -14,6 +14,7 @@ func main() {
primaryUrl := os.Getenv("LIBSQL_DATABASE_URL")
authToken := os.Getenv("LIBSQL_AUTH_TOKEN")
// Open the database
tdb, err := libsqldb.NewLibSqlDB(
primaryUrl,
migrationFiles,
@ -25,6 +26,7 @@ func main() {
os.Exit(1)
}
// Migrate the database
err = tdb.Migrate()
if err != nil {
fmt.Fprintf(os.Stderr, "failed to migrate db %s: %s", primaryUrl, err)