deleteLinkStats removes the link stats from memory.
(link *Link)
| 372 | |
| 373 | // deleteLinkStats removes the link stats from memory. |
| 374 | func deleteLinkStats(link *Link) { |
| 375 | stats.mu.Lock() |
| 376 | delete(stats.clicks, link.Short) |
| 377 | delete(stats.dirty, link.Short) |
| 378 | stats.mu.Unlock() |
| 379 | |
| 380 | db.DeleteStats(link.Short) |
| 381 | } |
| 382 | |
| 383 | // redirectHandler returns the http.Handler for serving all plaintext HTTP |
| 384 | // requests. It redirects all requests to the HTTPs version of the same URL. |
no test coverage detected