TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Break my Go chat app, please

2 点作者 ehonda将近 6 年前
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

Someone将近 6 年前
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 未加载