Jump to Content

Andrew M McCall

Andrew M McCall - Web Developer In Traverse City, Michigan

Golang

Different Types of String Encoding Using Golang

Notes regarding string encoding in golang

Golang Check for Mysql Duplicate Key Error

In short, we cast the error to a Mysql Error and check the code

Go Net Listener Http Server Example

We explore the net package, spin up a net.Listener, accept requests, and respond with html

Using Go Embed Package for Template Rendering

Go’s embed package is excellent for creating a Go template rendering engine. The benefit of using the embed package is that your templates get bundled with your binary. Learn how to use the embed package to render templates in golang applications.

Notes On Testing Golang Applications

My personal collection of Go testing notes. Some of these may be helpful if you find yourself in similar situations writing web applications.

Custom Golang Http Router With Middleware

Go standard library, as well as many others have already solved implementing a robust, production grade http server. So why bother writing one? This post will hopefully yield some insight of why it is important to revisit established technology.

Golang Send Multipart Form Data to Api Endpoint

We often need to send data and files from one JSON API endpoint to another. In this post, I explain how to use multipartform writer to send form data across api endpoint boundaries.

Unit Testing Json Encode

Here are my notes on testing a JSON writer for Golang that lets you wrap the response in an envelope

Golang Create a Random String

Go’s rand package can help us easily generate a random string for when we need to ensure uniqueness with naming in our applicaton. We walkthrough the process of generating a random string using golang.

Go Channels Tutorial - Understanding Goroutines and Channels

Go has powerful concurrency tools fully baked into the programming Language. This post aims to explain go routines and channels so you can get started using them in your own projects.