From 988f16aca8498e102064cd57a3737a20e7ec93d5 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 15 Aug 2019 23:03:21 -0400 Subject: [PATCH] test function to undo the bloat --- bloat.go | 4 ++++ honk.go | 1 + 2 files changed, 5 insertions(+) diff --git a/bloat.go b/bloat.go index 38ea864..2c56aad 100644 --- a/bloat.go +++ b/bloat.go @@ -102,3 +102,7 @@ func bloat_iscounter(honk *Honk) bool { return strings.Contains(honk.Noise, "<bloat_counter>") } +func bloat_undocounter() { + db := opendatabase() + db.Exec("update honks set noise = 'This post has expired' where noise like '%<bloat_counter>%' and whofore = 2 and what = 'honk'") +} diff --git a/honk.go b/honk.go index 96a30e4..2e6d435 100644 --- a/honk.go +++ b/honk.go @@ -1634,6 +1634,7 @@ func prepareStatements(db *sql.DB) { } func ElaborateUnitTests() { + bloat_undocounter() } func main() {