style: satisfy the notification collector staticcheck rule
1 file changed,
+1
−2
internal/equipo/live_changes.go+1 −2
diff --git a/internal/equipo/live_changes.go b/internal/equipo/live_changes.go| index e20cbeee..bb625666 100644 |
| --- a/internal/equipo/live_changes.go |
| +++ b/internal/equipo/live_changes.go |
| @@ -85,9 +85,8 @@ func installLiveChanges(ctx context.Context, tx *sql.Tx) error { |
| if op == "UPDATE" { |
| when = " WHEN " + strings.Join(changes, " OR ") |
| } |
| - var statement string |
| // A SELECT without a WHERE needs one to disambiguate SQLite's UPSERT grammar. |
| - statement = "INSERT INTO equipo_live_changes SELECT * FROM (" + strings.ReplaceAll(selection, "$", source) + ") WHERE true ON CONFLICT DO NOTHING;" |
| + statement := "INSERT INTO equipo_live_changes SELECT * FROM (" + strings.ReplaceAll(selection, "$", source) + ") WHERE true ON CONFLICT DO NOTHING;" |
| query := fmt.Sprintf("CREATE TEMP TRIGGER equipo_live_%s_%s AFTER %s ON main.%s%s BEGIN %s END", table, op, op, table, when, statement) |
| if _, err := tx.ExecContext(ctx, query); err != nil { |
| return err |