Your code is described in your API definition using a Golang Domain Specific Language (DSL), then generated using the Goa CLI, and implemented separately from your application source code.
Can Golang be object-oriented? Go is a post-OOP programming language, however, it can still leverage OOP patterns to structure the code in a clear and understandable way. This tutorial demonstrates how to use Go with OOP concepts, including constructors, subtyping, polymorphism, dependency injection, and testing with mocks.
Go is quickly becoming one of the most popular languages: It currently ranks 19 in the TIOBE programming community index, and powers popular software like Kubernetes, Docker, and Heroku CLI. However, for all its simplicity, Go may still be missing some things. In this article, Toptal Freelance Go Developer Sergei Peshkov shares his concerns about why Go is still far from perfect and how we can make it better.
Understanding the Input/Output (I/O) model of your application can mean the difference between an application that deals with the load it is subjected to, and one that crumples in the face of real-world uses cases. Perhaps while your application is small and does not serve high loads, it may matter far less. But as your application’s traffic load increases, working with the wrong I/O model can get you into a world of hurt.
Testing frameworks such as Testify, Ginkgo, and Gomega can streamline testing for Golang applications, however, some of the most efficient and effective tools for testing can be found in Go’s standard libraries. In this article, Toptal developer Gabriel Aszalos covers the basics of testing in Go, from table testing to JSON response assertion.
Real-time applications have already started to dominate the landscape of the Internet. With modern frameworks and standardization of the necessary client-side features, building a real-time web application has become a breeze. However, such web applications still pose unique scalability challenges. In this article, Toptal engineer Mahmud Ridwan explores the architecture of a simple real-time web application that works using Redis Pub/Sub and doesn't compromise its horizontal scalability.
NGINX, a sophisticated web server, offers high performance load balancing features, among many other capabilities. Like most other web server software for Unix-based systems, NGINX can be configured easily by writing simple text files. However, there is something interesting about tools that configure other tools, and it may be even easier to configure an NGINX load balancer if there was a tool for it. In this article, Toptal engineer Mahmud Ridwan demonstrates how easy it is to build a simple tool with a web-based GUI capable of configuring NGINX as a load balancer.
Deploying instances of a web application to one or more servers manually can often be a monotonous process, and take up a significant amount of your time. With little effort, it is possible to automate the process of deploying your web application with almost zero human intervention. This article outlines a simple approach to automating web application deployments using GitHub webhooks, buildpacks, and Procfiles.
Go is a relatively new language with a number of attractive features. It’s great for writing concurrent programs, thanks to an excellent set of low-level features for handling concurrency. In many cases, though, a handful of reusable abstractions over those low-level mechanisms makes life much easier. This introductory tutorial walks you through building one such abstraction: a wrapper that can turn any data structure into a transactional service in Go.
World-class articles, delivered weekly.
Subscription implies consent to our privacy policy
Thank you!
Check out your inbox to confirm your invite.
Join the Toptal® community.