HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
kstenerud
go
Go2019–2025
kstenerud / go

go

The Go programming language, modified to emit warnings

3Distinct people
22Mentions
0Explicit recommenders
21GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The Go programming language, modified to emit warnings

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 4:43:50 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year22 dated mentions

Observed mentions: 2019-04-18 17:01:57 UTC to 2025-07-12 00:11:56 UTC.

0369122019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 12 mentions; 3 submissions, 9 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC1239
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC909
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

12 sources
It's explained in the use case: https://github.com/kstenerud/go#use-case Use Case The use case for warnings is the exploratory development or debugging phases, where you really don't care about leaving unused things lying around for the time being (for example, temporarily commenting something out), and would rather that the compiler just got out of your way until you've got something ready to compile normally and commit. Usage go build -gcflags=-warnunused somefile.go go test -gcflags=-warnunused When you're done with your exploratory/debugging phase, simply build or test without the flag: go build somefile.go go test Compiling without the flags will fail on unused things as normal.
In Go compiler internals: Adding a new statement to Go
Yes, the workaround for unused things is: - comment out a line of code to check something. - compile, get an error about unused variables because a variable is unused now that the line that used it is commented out. - go back to the code and comment out that other line. - compile, get another error because there's another two variables that are now unused. - comment those lines out. - compile, get another error because an import is now considered unused. - repeat ad nauseum. - Fix the bug. - Uncomment everything you commented, and try to undo any changes you made to get around unused variables so that your code is mostly back to where it was, plus the bugfix. - Last compile to make sure everything works. -- I prefer this method: - Install a custom go compiler from https://github.com/kstenerud/go - comment out a line of code to check somet
Read the rest
hing. - go test -gcflags=-warnunused - fix the bug. - uncomment the line. - go test -- This has nothing to do with the difficulty of debugging the code, or the complexity of the code you are debugging. This is about getting the compiler to stop fighting you.
In Why I Don't Like Golang (2016)
This article is from 2016, but it's still relevant. Even in medium sized projects I've been bitten by many of these issues, and for a language that's supposed to eschew magic, there's an awful lot of wizardry going on. Stopping compilation with an error for every unused import & variable is particularly annoying, so much so that I've patched the go compiler to treat them as warnings instead [1]. Ultimately, I think the problem boils down to a language that outgrew its original design, and hasn't evolved elegantly (yet). [1] https://github.com/kstenerud/go
In Why I Don't Like Golang (2016)
Yes, Google effectively has final say over what goes into golang; that's never going to change. But then again, the same could be said of the cadres of people managing other languages. At the end of the day, SOMEONE has to be in charge, and that someone probably isn't you. I personally like to have strong leadership behind such fundamental things as languages. I may not agree with all of their decisions, but at least I can count on the stability, which we all need in order to collaborate successfully. With strong leadership, I know I we won't have another Python2 vs Python3 mess. And the ability to fork is very handy. I've forked my own golang compiler to allow warnings for unused imports, variables, etc [1] because I don't like fighting the compiler during debug or exploratory coding sessions. [1] https://github.com/kstenerud/go
In Russ Cox’s response to “Go Is Not a Community Driven Project”

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.