Go
Share:
These questions were only shown to respondents who chose Go as one of their three primary programming languages.
Famous for its efficiency and speed, concurrency features, strong standard library, simplicity, and readability, Go is definitely a production-ready language, and it’s not surprising that the share of developers using Go for work is increasing. Go is used in production by many large companies, including Google, Dropbox, Microsoft, PayPal, Netflix, and others.
This data is somewhat consistent with what we see in the surveys conducted by the Go team. Go is often called a “cloud language” because it’s widely used for building cloud-native applications and DevOps tools. This explains the popularity of Linux and macOS among Go developers.
Only about one third of Go developers work with a single project at a time, while the rest of them work with multiple projects simultaneously.
Go is great at backward compatibility, but some users still run several versions at the same time. One of the use cases is when developers set up their CI to run with two or three different versions of Go to catch regressions and detect other issues.
It makes sense that html/template takes the top spot. This package automatically escapes potentially dangerous content, such as user-generated data, and helps you avoid code injection attacks.
According to the recent Go survey, 37% of Go developers use Go to build websites and web services. This data explains why so many developers use JavaScript, TypeScript, and Go in the same project.
Python’s high ranking is probably propped up by the tendency of many Python projects to migrate to Go. When developers decide to add new services to a project written in Python, they tend to do so using Go, known for its efficiency, concurrency support, and strong performance in networking and web services. This approach has its disadvantages, but it allows developers to avoid rewriting their codebase.
Note that GoLand provides support for JavaScript and TypeScript out of the box. You can also install the Python Community Edition plugin and take advantage of its Python support.
The workspace mode was introduced in Go 1.18, allowing developers to work on multiple modules simultaneously without editing go.mod files for each module. With Go workspaces, you can control all dependencies using a go.work file.
Just as last year, the Gin framework is the most popular solution for web development, while the net/http package from the standard library continues to hold its own. Check out our Go REST Guide to better understand the differences between Gin and net/http.
In Go, vendoring is the practice of creating your own local copies of dependencies required for a specific project and including these copies in your file structure. This way, you can ensure that your project contains all the necessary code to build an application, and you don’t have to rely on downloading dependencies from external sources.
Like most approaches, vendoring comes with some drawbacks. Some developers think it makes the code repository less transparent and changes harder to review. Go modules help developers move away from vendoring thanks to features like Go proxy, which caches the dependencies and ensures that the right package version is always available.
Two popular routers, gorilla/mux and go-chi/chi, are still surpassed by the standard library. You can refer to the Go REST Guide to better understand the differences between gorilla/mux and the standard library.
Go developers have been asking for generics support since forever, and it was finally added to Go 1.18 in March 2022. A year or so later, more than 80% of Go developers are using or have tried generics.
TinyGo shows great results when you need to produce small and efficient programs for embedded systems or WebAssembly. As this poll shows, TinyGo is also used to create CLIs. Go has an outstanding standard library, but you may not need all of its firepower if you’re building a CLI that performs only basic tasks. In that case, TinyGo is a better choice, as it allows you to keep your CLI small and precise.
Thank you for your time!
We hope you found our report useful. Share this report with your friends and colleagues.
If you have any questions or suggestions, please contact us at surveys@jetbrains.com.