Choosing between a function or a method? That look like a simple question.
Go defines a method as a function with a receiver. What does it mean?
How choose carefully between the two? Let’s dive into this deeper than it seems topic.
For a project I’m working on, I have to manipulate a lot of slices. One of those manipulations is a simple function that creates a new slice filled with the same repeated value.
Being still influenced by other languages I worked with previously, I decided to create a function that I could use on any type.
Gitlab is an amazing platform for hosting source code but it can also automate the deployment of your website or application.
In this example, I’ll use a great static website generator named Hugo.
I’ll first show how to build the site and host it on gitlab pages, then how to send it to any other host.