Has AI changed the way you write Go code? #203996
Replies: 6 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Yeah, I use AI pretty regularly now, mostly for the boring stuff so I can spend my energy on actual logic. Where it helps me most in Go:
What I don't let it do: touch concurrency logic (goroutines, channels, mutexes) without me reading every line closely, and write anything that touches auth or security. Too easy for subtle bugs to slip through there, and Go's error handling patterns are just different enough from other languages that AI sometimes defaults to habits from JS/Python. As for which tool — I bounce between a couple depending on the task:
I haven't fully replaced manual coding — more like I've replaced the tedious manual coding. Curious if others draw the line in different places, especially around concurrency-heavy code. |
|
Definitely. I use AI regularly in my Go workflow, mostly through Claude Code and Codex. The biggest change for me isn't code generation itself, but how quickly I can explore unfamiliar codebases, refactor existing services, and write tests. I still prefer handling architecture decisions, concurrency, and performance-critical code myself. AI can produce valid Go that isn't necessarily idiomatic or efficient. One thing I've found particularly useful is combining AI agents with Go's tooling ( For me, AI hasn't replaced understanding the code. It's made the development and review cycle much faster. |
|
Honestly, I use it almost daily now, but mostly as a force multiplier rather than a replacement for writing code. For Go specifically, my favorite use cases are:
As for tools, GitHub Copilot stays on because the inline completions match Go's predictable syntax really well—it’s honestly uncanny at guessing the next struct field or repetitive error check. For larger tasks, refactoring, or architectural brainstorming, I usually lean toward Claude, especially when dealing with legacy codebases. That said, I still write the core domain logic manually. If you let an AI auto-generate complex business logic or advanced generics without paying close attention, it tends to write unidiomatic code or introduce subtle bugs that violate Go's simplicity ethos. |
|
I use every day! My Meta AI Spark Muse 1.1. - website building, projects, just to talk as to my smart collegue. Also Gemini, Sol, quite helpful and nice, |
|
I use AI tools almost daily as a powerful force multiplier rather than a replacement for manual coding, especially since Go's predictable syntax makes it uniquely suited for AI acceleration. In my workflow, LLMs excel at scaffolding tedious table-driven tests with diverse edge cases, generating repetitive glue code like HTTP middleware and JSON-to-struct conversions, and providing plain-English breakdowns of complex third-party packages or tricky concurrency patterns. For my tool stack, I keep GitHub Copilot active in my editor because it is uncannily accurate at predicting inline boilerplate and standard error checks, while I lean toward Claude for high-level architectural brainstorming and refactoring legacy code. However, I strictly write all core domain logic by hand; letting an AI auto-generate complex business logic or advanced generics frequently results in unidiomatic code or subtle bugs that violate Go's philosophy of simplicity. Ultimately, AI is an absolute game-changer for tests and boilerplate, but human oversight remains mandatory the moment heavy concurrency and goroutines enter the equation. |
Uh oh!
There was an error while loading. Please reload this page.
Discussion Type
Product Feedback
Discussion Content
I've started using AI tools for small Go tasks like generating boilerplate, writing tests, and explaining unfamiliar packages.
I'm curious how other Go developers are using AI in their workflow. Do you use it regularly, or do you still prefer writing everything manually?
Also, which AI tool has been the most useful for Go development—ChatGPT, GitHub Copilot, Claude, Gemini, or something else?
All reactions