Home » Go

Tag Archives: Go

Golang – First look at generics

This post is part of a series where I do my best to organize my thoughts around Go: its paradigms and usability as a programming language. I write this as a Java programmer that respects the principles of Elegant Objects. Go 1.18 Beta 1 was just released. These are my initial impressions of the main feature to be delivered in this release: generics. ...

Read More »

Go Desperately Needs Nil Safe Types

If you’ve worked with Go before, you’ve probably seen this runtime error. 1 panic: runtime error: invalid memory address or nil pointer dereference The current solution is checking thevar != nil before using the var, but forgetting to do that means your program will crash. That means this simple programmer error could take down your whole server. Hopefully you catch ...

Read More »

Common anti-patterns in Go

It has been widely acknowledged that coding is an art, and like every artisan who crafts wonderful art and is proud of them, we as developers are also really proud of the code we write. In order to achieve the best results, artists constantly keep searching for ways and tools to improve their craft. Similarly, we as developers keep levelling ...

Read More »

Golang – Smarter containers

This post is part of a series where I do my best to organize my thoughts around Go: its paradigms and usability as a programming language. I write this as a Java programmer that respects the principles of Elegant Objects. I wish to make a correction in this post. I want to focus on this statement: Products is not a ...

Read More »

Put Gosec in Your Pipeline to Spot Source Code Security Problems

Golang keeps trending up and to the right in programming language popularity, for many reasons. Great libraries, which means more users, which means more libraries and more users — more users like me who are prone to make mistakes. To err is human, to forgive divine – Alexander Pope Who can say at one time or another they haven’t accidentally ...

Read More »

Build a RESTful API in Go using AWS Lambda

java-interview-questions-answers

In this post we will learn to design, build, and deploy a RESTful API in Go using AWS Lambda. Before starting, let me give you a brief introduction about AWS Lambda. What is AWS Lambda? AWS Lambda is a serverless compute service that runs our code in response to events and automatically manages the underlying compute resources for us. We can use AWS Lambda ...

Read More »

Working with Glide – Vendor Package Management for Go

In this post, we will use Glide to manage the dependencies of a Go project. Before starting, let me give you a brief introduction about Glide. What is Glide? Glide is a package manager for Go that is conceptually similar to package managers for other languages such as NPM for Node.js, Pip for Python, and so forth which records dependency ...

Read More »

Creating Your Own Package in Go

A package in Go is a namespace that organizes a set of related files. We can think of packages as being similar to different folders. Go standard library comes with a number of packages which can be used for building real-world applications. Moreover Go supports writing our own packages promoting code modularization and better composability of applications following certain rules, like ...

Read More »

From Macro to Microservices: Jumpstarting Your Transition

In my last article, we went through the reasons why changing from macro to microservices might be a good idea. In this one, we get to the real stuff: How a facade proxy should function to start replacing your old services and/or introducing new ones the easy way, and then how to deploy it to AWS inside a Docker container. ...

Read More »