TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Break my Go chat app, please

2 pointsby ehondaalmost 6 years ago
Made a small chat program in Go. Looking for maybe a couple people to take a poke at it and maybe find bugs.<p>Can reach it here: wiby.me&#x2F;chat<p>The source can also be looked at from there. The idea is to make it work on pretty much any browser on any system from the last 30 years, and fit on a 9&quot; mac. Anyhow, I am looking for some free labor to test it out.<p>Thank you in advance.

1 comment

Someonealmost 6 years ago
It’s inefficient to read the list of swear words every time <i>swearfilter</i> is called (and similarly for <i>checkban</i> and <i>checkAdminIP</i>)<p>The way it is implemented, you’ll also have quite a few false positives (<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Scunthorpe_problem" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Scunthorpe_problem</a>)<p>Also, is it common idiom in Go to both <i>defer f.Close()</i> and manually call <i>f.Close()</i>? Seems noisy to me (and would, in many other systems, give an error when the deferred code tries to close an already closed file)<p>Other issue: from glancing at the code, the 403 page doesn’t seem to return a 403 status code.
评论 #20229033 未加载