One of the biggest mindset shifts I've had while learning Go came when I reached functions and methods.

As a Ruby developer, almost everything revolves around objects. Every piece of behavior belongs to a class, and every function is really just a method attached to an object.

Go takes a different approach.

Functions exist independently, and methods are simply functions with a receiver. There are no classes, no inheritance, but still writing object-oriented code.

Let's see how Go approaches behavior compared to Ruby.