Sources
453 sources collected
go.dev
AI assistance- The biggest challenge for teams using Go was **maintaining consistent coding standards** across their codebase. This was often due to team members having different levels of Go experience and coming from different programming backgrounds, leading to inconsistencies in coding style and adoption of non-idiomatic patterns. … This suggests that current offerings are ... Similarly, in 2023, 47% respondents said they would like suggestions for best practices while coding, while only 14% a year later said they are using AI assistance for this use case. 46% said they wanted help catching common mistakes while coding, and only 13% ... … The most commonly reported challenges for teams were maintaining consistent coding standards across our Go codebase (58%), identifying performance issues in a running Go program (58%) and identifying resource usage inefficiencies in a running Go program (57%). 21% of respondents said their team would benefit most from maintaining consistent coding standards across their Go codebase. This was the most common response, making it a good candidate to address. ... According to the write-in responses, many teams face challenges maintaining consistent coding standards because their members have varying levels of experience with Go and come from different programming backgrounds. This led to inconsistencies in coding style and the adoption of non-idiomatic patterns. ... They seem to struggle maintaining the code consistency following the Go guidelines.”—Go developer with 2–4 years of experience.* ... For those who were at least slightly familiar with SIMD, we asked some follow -up questions to understand how respondents were affected by the absence of native SIMD support in Go. Over a third, about 37%, said they had been impacted. 17% of respondents said they had been limited in the performance they could achieve in their projects, 15% said they had to use another language instead of
faun.dev
Go Developer Survey Is OutThe 2025 Go Developer Survey reveals developers' desire for better best practices, enhanced standard library usage, and modernized tooling. AI-powered development tools are common, yet satisfaction is moderate due to quality concerns. Most respondents are experienced developers in the tech industry, highlighting challenges like ensuring code quality and finding reliable modules. ### Key Points ... A major challenge for Go developers is identifying and consistently applying idiomatic best practices, along with finding trustworthy third-party modules. Use of AI-powered development tools is now common among Go developers, but overall satisfaction remains moderate due to concerns about code quality and reliability. … ... The **2025 Go Developer Survey** is out and it offers a clear snapshot of where the Go ecosystem stands today and where friction remains. Developers broadly value Go as a stable, productive platform, but they are asking for more guidance on **best practices**, better ways to **leverage the standard library**, and **modernized tooling** to reduce day-to-day friction. AI-powered development tools are now widely used among Go developers, particularly for learning, boilerplate generation, unit tests, and autocompletion. However, satisfaction remains moderate. The dominant concern is **code quality**: AI-generated output often requires careful review, corrections, and contextual adjustments, which limits trust and caps productivity gains. AI is seen as helpful for reducing toil, not as a reliable autonomous coder. The survey highlights a recurring usability issue with Go's tooling: **core command documentation**. A significant number of developers report frequently revisiting documentation for fundamental commands such as `go build`, `go run`, and `go mod`. The current help system is functional but not discoverable or ergonomic enough - this is what the data suggests. … Three challenges dominate developer feedback: - Difficulty identifying and enforcing best practices. - Missing language features commonly found elsewhere, particularly around **error handling**, **enums**, and expressiveness. - Trouble identifying **trustworthy third-party modules**, with developers asking for stronger quality signals, maintenance indicators, and usage context. … 28 % Percentage of respondents frustrated by missing language features found in other languages. 26 % Percentage of respondents reporting difficulty finding trustworthy Go modules. 53 % Percentage of respondents using AI-powered development tools daily. 29 % ... 55 %
**Observability in Go is still a puzzle** Go offers incredible performance and simplicity – but when it comes to observability, it lags behind its peers. Across interviews, we consistently heard the same theme: **instrumentation in Go is painful**. Compared to Java or Python, where tools like OpenTelemetry work out-of-the-box, Go often requires significant manual effort, boilerplate, and careful context propagation. Instrumentation in Go took us 6–8 months. It was worth it – but a huge pain.Others simply gave up on manual instrumentation entirely. **The cost of too much data** Another recurring pain point was **data overload**. As one user put it: “We generate trillions of requests. Filtering that down is everything.” … Still, even with all this tuning, **telemetry costs and data quality issues**remain a problem for many. **Tracing: loved and hated** There’s a universal recognition of the power of **distributed tracing**, but also wide frustration with the current tools and workflows. **Common issues:** - Lack of automation in Go - Forgetting to pass context - Weak trace search (especially with Jaeger) - Span gaps (especially around databases and queues) Despite these challenges, nearly everyone wanted better tracing – not fewer traces. *Tracing helped us catch a memory spike that would have taken weeks otherwise.* ... **Auto-instrumentation**: Especially for HTTP/gRPC and third-party libraries **Span coverage tools**: “Why is this path not instrumented?” **Minimal code pollution**: Nobody wants another
www.roastdev.com
Dev Blog: Is plain Go Still a Good Choice in 2025? | Coding Tutorials & Best PracticesAs we move through 2025, the software development landscape continues to evolve rapidly. Technologies like microservices, cloud-native applications, and distributed systems are becoming the standard. ... ## The Challenges of Plain Go in 2025 While Go still has significant strengths, using plain Go without any frameworks presents several challenges in the modern development landscape, especially for more complex applications. ### Increasing Complexity of Modern Applications In 2025, even a simple microservice may need to integrate with multiple dependencies to meet production standards. These might include tools for distributed tracing, metrics collection, circuit breaking, and various communication protocols. Managing these integrations manually in plain Go often results in significant boilerplate code and a higher maintenance burden. |Challenge|Plain Go|Frameworks (e.g., GoFr)| |--|--|--| |Integration|Manual|Built-in integration of logging, tracing, and messaging| |Code Redundancy|High|Low (predefined patterns)| |Maintenance|High|Low (centralized updates)| ### Reinventing Common Patterns Without frameworks, developers often find themselves reimplementing common patterns and solutions to recurring challenges. This might include setting up logging, configuring middleware, implementing health checks, or managing database connections. Such redundant work can slow down development and introduce inconsistencies across projects. ### Onboarding and Knowledge Transfer In today's competitive job market, the speed at which new team members become productive is crucial. With plain Go, developers may spend days or even weeks learning the project-specific implementations of common patterns before they can contribute effectively. This extended onboarding process can negatively impact project timelines and team productivity. … The question isn't whether plain Go is viable—it absolutely is for many use cases. The real question is whether your team can afford the overhead of manually integrating and maintaining numerous dependencies and reimplementing common patterns across services. For teams building complex, distributed systems, frameworks like GoFr provide a compelling balance of productivity and performance. The ideal approach may be a pragmatic one: use plain Go where its simplicity and performance are paramount, and leverage frameworks like GoFr where productivity and standardization matter most.
golangweekly.substack.com
Golang Weekly Issue 167- **Results from the 2025 Go Developer Survey**: 5,379 Go developers responded, reporting high satisfaction with Go and its tooling, with common pain points including understanding best practices, missing features, and evaluating trustworthy third-party modules (plus a look at AI tool usage).
bravenewgeek.com
Go Is Unapologetically Flawed, Here's Why We Use ItWe use Go *because it’s boring*. Previously, we worked almost exclusively with Python, and after a certain point, it becomes a *nightmare*. You can bend Python to your will. You can hack it, you can monkey patch it, and you can write remarkably expressive, terse code. It’s also remarkably difficult to maintain and slow. I think this is characteristic of statically and dynamically typed languages in general. Dynamic typing allows you to quickly build and iterate but lacks the static-analysis tooling needed for larger codebases and performance characteristics required for more real-time systems. In my mind, the curve tends to look something like this: … ### The Untype System To put it mildly, Go’s type system is impaired. It does not lend itself to writing quality, maintainable code at a large scale, which seems to be in stark contrast to the language’s ambitions. The type system is noble in theory, but in practice it falls apart rather quickly. Without generics, programmers are forced to either copy and paste code for each type, rely on code generation which is often clumsy and laborious, or subvert the type system altogether through reflection. … The argument there, I suppose, is to rely on interfaces to specify the behavior needed in a function. In passing, this sounds reasonable, but again, it quickly falls apart for even the most trivial situations. Further, you can’t add methods to types from a different (or standard library) package. Instead, you must effectively alias or wrap the type with a new type, resulting in more boilerplate and code that generally takes longer to grok. You start to realize that Go isn’t actually all that great at what it sets out to accomplish in terms of fostering maintainable, large-scale codebases—boilerplate and code duplication abound. It’s 2015, why in the world are we still writing code like this: Now repeat for uint32, uint64, int32, etc. In any other modern programming language, this would get you laughed out of a code review. In Go, no one seems to bat an eye, and the alternatives aren’t much better. … Another idiosyncrasy is adding an item to a channel which is closed. Instead of returning an error, or a boolean, or whatever, *it panics*. Perhaps because it’s considered a programmer error? I’m not sure. Either way, these behaviors seem inconsistent to me. I often find myself asking what the “idiomatic” approach would be when designing an API. Go could really use proper algebraic data types. … In actuality, to write high-performance Go, you end up throwing away many of the language’s niceties. Defers add overhead, interface indirection is expensive (granted, this is not unique to Go), and channels are, generally speaking, on the slowish side. For being one of Go’s hallmarks, channels are a bit disappointing. As I already mentioned, the behavior of panicking on puts to a closed channel is problematic. What about cases where we have producers blocked on a put to a channel and another goroutine calls close on it? They panic. Other annoyances include not being able to peek into the channel or get more than one item from it, common operations on most blocking queues. … But upon closer inspection, we realize this approach is subtly broken. While it works, if we stop iterating, the loop adding items to the channel will block—the goroutine is leaked. Instead, we must push the onus onto the user to signal the iteration is finished. It’s far less elegant and prone to leaks if not used correctly—so much for channels and goroutines. … ### Dependency Management in Practice For being a language geared towards Google-sized projects, Go’s approach to managing dependencies is effectively nonexistent. For small projects with little-to-no dependencies, *go get* works great. But Go is a server language, and we typically have many dependencies which must be pinned to different versions. Go’s package structure and *go get* do not support this. Reproducible builds and dependency management continue to be a source of frustration for folks trying to build real software with it. … A few other technical points: – “Cannot add methods to types from a different package”: Would you want something like extension methods in C#? – “Channels are slow”: I’ve read there is some work going on to improve them. That said, you admit yourself that Go is still one the best option among the “concurrent” languages. Are you aware of another language with a similar mechanism builtin in the language or the library and that performs better on this matter?
Begin by utilizing Go's powerful type system effectively. Research shows that approximately 30% of runtime errors in programming stem from type mismatches. Leveraging Go's static typing can significantly reduce these issues, leading to more robust code. Embrace type assertions and interfaces judiciously to ensure clarity in your data structures. Next, prioritize concurrency management. A staggering 50% of developers express difficulties with Goroutines and channels. Misuse can lead to race conditions or deadlocks. Familiarize yourself with tools like the Go race detector to identify and troubleshoot concurrency issues before they escalate. … ## Common Go Developer Pitfalls for Beginners & How to Avoid Them Avoiding the misuse of Goroutines is key. It’s crucial to understand that overusing them can lead to excessive context switching and performance degradation. According to Google’s Go Blog, proper concurrency patterns can improve performance by nearly 30%. Always utilize synchronization methods like WaitGroups and Channels to control Goroutine lifecycle effectively. Another critical aspect is error handling. Many early coders overlook error checking, resulting in silent failures. Statistics show that 59% of Go developers face this issue. Always return errors to the caller and handle them appropriately. Implementing proper logging practices helps to trace issues when they arise. Understanding the type system is vital. Newcomers might incorrectly assume that all Go types behave the same. This misunderstanding can lead to unexpected behavior, especially when using maps and slices. Always refer to official documentation, as 42% of new users struggle with type assertions and conversions. Another factor to consider is dependency management. Not using Go modules can complicate project portability and dependency retrieval. According to the Go community survey, 37% of developers use vendoring, which can cause compatibility issues. Always maintain consistent version control with Go modules to ensure reproducibility. … |Issue|Statistic|Recommendation| |--|--|--| |Misuse of Goroutines|30% performance improvement with proper patterns|Use WaitGroups and Channels| |Error handling|59% face issues due to neglect|Always check and log errors| |Type system confusion|42% struggle with assertions|Consult official documentation regularly| |Dependency management|37% use vendoring|Utilize Go modules for version control| |Neglecting tests|50% do not write tests|Implement unit tests with the ‘testing’ package| … |Problem|Solution| |--|--| |Too many goroutines consuming resources|Implement a worker pool to limit concurrency| |Performance degradation under load|Use tools like pprof for monitoring| |Race conditions in data handling|Leverage channels for safe communication| … - **Memory Impact:** Running 1,000 goroutines could consume 2 MB of memory, while 10,000 could use up to 20 MB with additional overhead. - **Context Switching:** The Go scheduler incurs a penalty with significant context switching; even a modest increase can halve throughput. For lightweight tasks, consider using channels or worker pools. This can help manage concurrency without the downsides associated with an excessive number of goroutines. … ### Inappropriate Use of Channels Utilize channels in Go with clear purpose and structure. Misusing them can lead to deadlocks and performance issues. Always assess whether a channel is necessary or if a simpler approach, such as using goroutines or shared memory, is more suitable. Channels should not be used for tasks that could be handled by simple function calls. For example, using a channel to pass error messages instead of returning errors can complicate code and decrease readability. Statistically, 75% of Go developers prefer returning errors directly in most synchronous cases. Blocking calls on channels may introduce latency. If a goroutine waits indefinitely for a message that will never arrive, this can lead to a deadlock scenario. Implement timeouts using the `select` statement to prevent such situations. |Channel Usage Problem|Recommended Approach|Key Statistics| |--|--|--| |Deadlocks from improper synchronization|Implement timeouts and context-based cancellation|60% of Go applications face performance degradation due to deadlocks| |Unnecessary complexity in code|Use direct function returns for computations|80% of developers find simpler code easier to maintain| |Excessive channel creation|Reuse channels where applicable to minimize overhead|Channel creation can increase resource consumption by up to 30%| … ### Mismatching Error Types in Interfaces Avoid implementing interfaces with mismatched error types. In Go, it's essential to define error handling clearly. If an interface expects a specific error type, returning a different one can lead to panic situations or unexpected behavior. Stick to consistent error types across your application. Consider defining a custom error type that implements the built-in … method with %w to wrap errors, preserving their original type and context. **Data Point:** According to a recent survey by Stack Overflow, 45% of Go programmers find unclear error handling a significant issue, emphasizing the need for straightforward practices. Always ensure that your error messages contain actionable information that helps diagnose the problem. Avoid abstract descriptions, which can lead to confusion and increased resolution time.
www.infoworld.com
Go Has Extra Error HandlingIn 2007, some of the programmers at Google looked at their options for writing software and didn’t like what they saw. They needed to manage millions of lines of code that would be constantly storing and shipping data for the world wide web. The code would juggle thousands or maybe millions of connections on networks throughout the globe. … What some developers love about Go, others hate just as much. \n8 reasons developers love or hate the Go language\n\nIt's easy to learn\nIt doesn't play favorites\nThe C-based syntax\n(Too) many rules\nExtra error handling\nThe standard library\nThe executable size\nBig daddy Google\n\nGo is easy to learn\nGo's designers deliberately created a language that would be quick to learn, because it didn’t have too many complex features or idiosyncrasies. … Would a witch choose an abridged spell book? Would a quarterback choose a playbook with just a few plays? Some coders feel that programming with Go is like coding with one hand tied behind their back. The language lacks all the cleverness other language designers have delivered to the world, and that's a high price to pay.\nGo doesn't play favorites\nThe original developers wanted to create a small language, and they did so at the expense of many favorite features found in other languages. … There are no curly punctuation marks to delineate blocks of code and the typing is deliberately dynamic. Anyone who loves the Python approach will find plenty to dislike about Go. From this perspective, programming with Go feels like a step or three backward.\nGo has (too) many rules\nFrom the beginning, Go's creators wanted to define not just the syntax but also much of the style and usage patterns of the language. … There’s even a separate type system for errors that allows programmers to create more specific forms of errors, then spell out how they should be handled.\nWhy some love it: The Go approach acknowledges that errors exist and encourages the programmer to make a plan for handling them. This encourages programmers to plan ahead and build in the kind of resilience that makes for better software.\nWhy some hate it: Unnecessary error handling makes Go functions fatter and harder to understand. … Problems like vendor lockin and lack of control are serious issues for anyone trying to curate a tech stack. All of Google’s generosity still leaves programmers leery, especially when other language choices have large, open source communities built around them.
forum.zoho.to
What Are the Limitations Of Golang in 2025?However, like any programming language, Go has its set of limitations as of 2025. ... Despite the introduction of generics in recent updates, some developers find Go’s implementation lacking in comparison to other languages like Java or C#. The complexity of using generics and limited syntactical sugar might slow down its adoption a**** Go veterans who have grown accustomed to the idiomatic way of writing Go code. As of 2025, Go still lacks a standard library for GUI development. While there are third-party solutions available, they often lack the integration and comprehensive documentation needed for seamless development, which can be a hindrance for projects aiming for cross-platform graphical user interfaces. Error handling in Go has been a topic of debate due to its verbose nature. Using `if err != nil` after every function call can lead to less readable code, making error management cumbersome for developers. While Go’s explicit error handling promotes clear understanding of error flows, it can be considered a limitation in terms of code succinctness and elegance. Go’s design philosophy emphasizes simplicity and readability, but this also means it has limited support for metaprogramming. Features like reflection are available, but they are not as powerful or easy to use as in languages like Python or Ruby. This limits dynamic code generation and runtime behavior manipulation, which are essential for certain types of applications. Although improvements have been made with modules, developers in 2025 often find Go’s package management lacking compared to more mature ecosystems like Node.js with npm or Python with pip. The inclusion of better dependency handling and version conflict resolution tools could significantly enhance the developer experience. While Go continues to be a powerful tool for a variety of applications in 2025, these limitations should be taken into consideration when choosing the right technologies for your next project.
crufter.com
About János Dobronszki### Lack of generics Generics are well supported by a wide range of languages, and is one of the most requested lacking features of Go. The usual response from the Go authors is that implementing generics will either slow down compilation, the code, or the programmer. While that is almost a believable reason, the funnier part of their reasoning is (excerpt from FAQ): … #### Flow disruption Perhaps the most elusive, but rather destructive aspect of the lack of generics in Go is how the language forces the user to go into uninteresting details while expressing ideas, disrupting the programmer’s flow. We don’t have to venture far to see examples of this - we can stay at the topic of list operations, as we did in the previous example. … #### Lack of deriving Default implementations for certain interfaces should be provided. How can Go print out our structs or maps correctly? We don’t know. It is done with reflection, which is runtime concept and sidesteps the type system entirely. The ad hoc, edge case laden nature of Go shows here again. For those who are unfamiliar with the concept: … ### Other minor annoyances #### General inelegance ##### Superflous syntax Almost everywhere superflous brackets of all types can be found. What is the purpose of: vs (hypothetical Haskell equivalent) ? Go got rid of some of these (for loop, if requires no parentheses), but there are still plenty. ##### Operators should be functions The only reason operators are not functions is because the type system is not sophisticated enough to describe them.
golang50shades.com
50 Shades of Go: Traps, Gotchas, and Common Mistakes for ...- Opening Brace Can't Be Placed on a Separate Line - Unused Variables - Unused Imports - Short Variable Declarations Can Be Used Only Inside Functions - Redeclaring Variables Using Short Variable Declarations - Can't Use Short Variable Declarations to Set Field Values - Accidental Variable Shadowing - Can't Use "nil" to Initialize a Variable Without an Explicit Type - Using "nil" Slices and Maps - Map Capacity - Strings Can't Be "nil" - Array Function Arguments - Unexpected Values in Slice and Array "range" Clauses - Slices and Arrays Are One-Dimensional - Accessing Non-Existing Map Keys - Strings Are Immutable - Conversions Between Strings and Byte Slices - Strings and Index Operator - Strings Are Not Always UTF8 Text - String Length - Missing Comma In Multi-Line Slice/Array/Map Literals - log.Fatal and log.Panic Do More Than Log - Built-in Data Structure Operations Are Not Synchronized - Iteration Values For Strings in "range" Clauses - Iterating Through a Map Using a "for range" Clause - Fallthrough Behavior in "switch" Statements - Increments and Decrements - Bitwise NOT Operator - Operator Precedence Differences - Unexported Structure Fields Are Not Encoded - App Exits With Active Goroutines - Sending to an Unbuffered Channel Returns As Soon As the Target Receiver Is Ready - Sending to an Closed Channel Causes a Panic - Using "nil" Channels - Methods with Value Receivers Can't Change the Original Value - Closing HTTP Response Body - Closing HTTP Connections - JSON Encoder Adds a Newline Character - JSON Package Escapes Special HTML Characters in Keys and String Values - Unmarshalling JSON Numbers into Interface Values - JSON String Values Will Not Be Ok with Hex or Other non-UTF8 Escape Sequences - Comparing Structs, Arrays, Slices, and Maps - Recovering From a Panic - Updating and Referencing Item Values in Slice, Array, and Map "for range" Clauses - "Hidden" Data in Slices … - Blocked Goroutines and Resource Leaks - Same Address for Different Zero-sized Variables - The First Use of iota Doesn't Always Start with Zero - Using Pointer Receiver Methods On Value Instances - Updating Map Value Fields - "nil" Interfaces and "nil" Interfaces Values - Stack and Heap Variables - GOMAXPROCS, Concurrency, and Parallelism - Read and Write Operation Reordering - Preemptive Scheduling - Import C and Multiline Import Blocks - No blank lines Between Import C and Cgo Comments - Can't Call C Functions with Variable Arguments … ###### Built-in Data Structure Operations Are Not Synchronized - level: beginner Even though Go has a number of features to support concurrency natively, concurrency safe data collections are not one them :-) It's your responsibility to ensure the data collection updates are atomic. Goroutines and channels are the recommended way to implement those atomic operations, but you can also leverage the "sync" package if it makes sense for your application.
en.zicos.com
Go teams struggle with coding standards – survey| Navigation Search|## Go teams struggle with coding standards – survey Thursday January 2, 2025. 07:37 PM , from InfoWorld Although developer sentiment toward the Go language remains very positive, teams face a challenge when it comes to maintaining consistent coding standards across Go code bases, according to Go developer survey results for the second half of 2024. Go developers also have been quick to adopt AI assistants, the survey found. The survey, conducted from September 9 through September 23, found that 93% of respondents felt satisfied working with Go during the prior year. Maintaining consistent coding standards, though, was a challenge due to team members having different levels of Go experience and coming from different programming backgrounds. This has led to inconsistencies in coding styles and adoption of non-idiomatic patterns. Published December 20, 2024, the survey covered a total of 4,156 responses, with participants recruited from the Go blog and randomized prompts in the Go plugin for Visual Studio Code and the GoLand IDE. ... In other findings in the survey: 70% of respondents were using AI assistants when developing with Go. The most common uses were LLM-based code completion, generating Go code from natural language descriptions, writing tests, and brainstorming. The survey found a significant discrepancy between what respondents said they wanted to use AI for last year and their current use for AI.