Live Reload Go Projects with wgo
Building web apps in Go is extremely rewarding. However, as Go’s a compiled language, to see changes, you need to restart the app. Needless to say that’s quite tedious! With live reloading, it doesn’t need to be.
Building web apps in Go is extremely rewarding. However, as Go’s a compiled language, to see changes, you need to restart the app. Needless to say that’s quite tedious! With live reloading, it doesn’t need to be.
Restricting HTTP request methods, when working with net/http prior to Go 1.22 was a little complicated. However, that’s all changed. Now, it’s pretty trivial. In this short tutorial, I’ll show you the new approach.
What is go mod tidy and why you would use it? In this short tutorial you’ll get a brief introduction to what it is and see the essentials of how to use it.
Recently, I started debugging Go code using Visual Studio Code. Some minor hiccups aside, it was pretty trivial to get up and going. This is the short version of what you need to do to get started.
Recently, I deployed a Go-powered app backed by an SQLite database on Fly.io for the first time. Here’s the process that I went through, along with some of the issues that I encountered along the way.
Recently, while working with the Twilio Lookup API, I had the opportunity to properly learn about Go’s empty interface. During the process, I realised that I didn’t understand it properly, so took the opportunity to do so. Today, I am going to step through what it is and how simple they are to work with.
It’s incredibly easy to build web apps and APIs using Go’s net/http package. All you really need to do is to specify a route and its handler. But, how do you restrict the methods that routes can accept? In this short tutorial, I’ll show you how.
Substitutability or the Liskov Substitution Principle (LSP) is a concept that I’ve tried to adhere to for some years when writing code. It’s beneficial for many reasons, but particularly when testing, as it can indirectly force you to write code that is more testable. Recently, I’ve started appreciating how it works in Go, and will step through how in this short article.
Today, on day 14, I created a custom method to remove code duplication creeping into the weather station codebase. Come read the fun story behind getting that done.
Here we are on day 13. Today, I continued learning Golang by working on the Golang version of my PHP/Python weather station, adding a function to render static pages. Let me share my learnings with you.
Here we are on day 12. I didn’t solve anything. I’m feeling that these exercises are becoming arbitrary and pointless.
Here we are on day 11, where I solved the Stringers Exercise.
Here we are on day 10. Today I read about and played with Type Assertions, Type Switches, and Stringers in Go.
Here we are on day 9. Today, I dove down a proverbial rabbit hole. While intending to learn more about Go’s Empty Interface, I ended up reading about Abductive and Deductive reasoning, and Duck, structured, and nominal typing.
Here we are on day 8. Today, I started learning about methods, pointer receivers, and interfaces.
Here we are on day 7. Today, I started learning about closures!
Here we are on day 6 – the start of the week two. Today, was a slower day, where I focused on one topic, maps!
Here we are on day 5 – the end of the first week. Today, I solved the Slices exercise!
Here I am at day 4. Today, I learned about the range function and started the slices exercise…but got stuck.
Here I am at day 3. Today, I started learning about pointers, arrays, slices, and structs!
Today was a slightly slower day for learning Go than was yesterday. However, I learned about flow control statements, and defer, panic, and recover.
For the longest time, I’ve been meaning to learn another software development language in-depth, in addition to my primary development language, PHP. I’ve decided that the language is Go.