Open in app

Sign In

Write

Sign In

Brandon Atkinson
Brandon Atkinson

147 Followers

Home

About

Published in Level Up Coding

·Oct 6, 2022

Mocking Outbound HTTP Calls in Golang — net/http/httptest

A while back I wrote an article titled “Mocking Outbound HTTP Calls in Golang” which showed how to mock downstream HTTP calls using an HTTP interface. The goal was to showcase how you can test any of your code without making any actual HTTP calls. This method works wonderfully, but…

Golang

8 min read

Mocking Outbound HTTP Calls in Golang — net/http/httptest
Mocking Outbound HTTP Calls in Golang — net/http/httptest
Golang

8 min read


Published in Level Up Coding

·Jun 23, 2022

Multi-String Replace in Golang with Replacer

String replacements in Golang are very easy using the strings package. From their docs: “Package strings implements simple functions to manipulate UTF-8 encoded strings”. Take the following sentence: "Hello World!" Now let’s say my product owner thinks saying “Hello World” with an exclamation mark is just too much, and if…

Golang

3 min read

Multi-String Replace in Golang with Replacer
Multi-String Replace in Golang with Replacer
Golang

3 min read


Published in Level Up Coding

·Dec 29, 2021

Training an ML.NET Image Classification Model on GPUs using Google Colab

If you’re an ML.NET user and looking to train your models on GPUs, you may find you have limited options that are easy to consume. If you happen to be on a desktop that can support Nvidia GPU graphics cards you're in luck! If you happen to be on a…

Mlnet

16 min read

Training an ML.NET Image Classification Model on GPUs using Google Colab
Training an ML.NET Image Classification Model on GPUs using Google Colab
Mlnet

16 min read


Published in Level Up Coding

·Oct 11, 2021

Effective Debugging with .NET Core & Docker Compose (Launch Compose Stack on Debug Start in VS Code)

Most of the projects I work with today have external dependencies of some sort. This could be a database, a cloud provider, or just another API that I need to talk to. It’s rare that I don’t have to communicate with something over a network in order to develop my…

Docker Compose

7 min read

Effective Debugging with .NET
Effective Debugging with .NET
Docker Compose

7 min read


Published in Level Up Coding

·Sep 14, 2021

Sharing Docker Images Without Docker Hub

Recently I was working on a side project and needed to switch over to another laptop to work. My project called for a Docker image that laptop #2, unfortunately, did not already have. I went to do a simple Docker pull and got the dreaded: Error response from daemon: Get…

Docker

4 min read

Sharing Docker Images Without Docker Hub
Sharing Docker Images Without Docker Hub
Docker

4 min read


Published in Level Up Coding

·Jan 2, 2021

Calling Multiple APIs Concurrently in Go (Goroutine and WaitGroup)

With so many REST APIs floating around today, you’ll at some point find yourself in a situation where you need to call multiple endpoints to build a proper representation of your business object. This is not a difficult task, just create a new object, call the various APIs for data…

Go

5 min read

Calling Multiple APIs Concurrently in Go (Goroutine and WaitGroup)
Calling Multiple APIs Concurrently in Go (Goroutine and WaitGroup)
Go

5 min read


Published in Level Up Coding

·Dec 31, 2020

Unit Test SQL in Golang, Without Mocking, Using TestContainers (Go, Postgres, Docker, TestContainers)

I wrote another article about this same topic which utilized a pure Docker solution to test database code without mocking. It was a cool solution, and worked really well, however it was a bit heavy-handed. It required special scripts, a certain folder structure, and could be hard to follow at…

Testing

11 min read

Unit Test SQL in Golang, Without Mocking, Using TestContainers (Go, Postgres, Docker…
Unit Test SQL in Golang, Without Mocking, Using TestContainers (Go, Postgres, Docker…
Testing

11 min read


Published in Level Up Coding

·Dec 14, 2020

Mocking Outbound HTTP Calls in Golang — interfaces

Engineers these days have so many cool APIs to work with. You can literally find an API for a particular need with only a Google search. We have Twilio for sending emails/faxes/text messages, The Rundown for real-time sports scores and odds, or Airbnb to manage your listings. …

Golang

10 min read

Mocking Outbound HTTP Calls in Golang
Mocking Outbound HTTP Calls in Golang
Golang

10 min read


Published in Level Up Coding

·Dec 7, 2020

Unit Test SQL in Golang, Without Mocking, Using Docker (Go, Postgres, Docker)

UPDATE: I’ve written a companion article using TestContainers, based on a comment that I should look into that package. It accomplishes the same goal, testing database code without mocks. You can read it here: https://atkinsonbg.medium.com/unit-test-sql-in-golang-without-mocking-using-testcontainers-go-postgres-docker-4f61574b1989 Recently while working on an API that interfaced with a database, I mistakenly updated our…

Docker

16 min read

Unit Test SQL in Golang, Without Mocking, Using Docker (Go, Postgres, Docker)
Unit Test SQL in Golang, Without Mocking, Using Docker (Go, Postgres, Docker)
Docker

16 min read


Published in Level Up Coding

·Nov 16, 2020

Debugging Go Inside Docker, Using Visual Studio Code and Remote Containers

There have been many times in my career or when working on personal projects, that I have needed some open-source executables to help me complete my task. I have used things like Weasyprint, WKHTMLTOPDF, Exiftool, Ghostscript, the list goes on and on (these are just some of the more recent…

Docker

8 min read

Debugging Go Inside Docker, Using Visual Studio Code and Remote Containers
Debugging Go Inside Docker, Using Visual Studio Code and Remote Containers
Docker

8 min read

Brandon Atkinson

Brandon Atkinson

147 Followers

A software engineer who really enjoys learning new tech! Connect with me on LinkedIn: https://tinyurl.com/y5eb48gm or GitHub: https://github.com/atkinsonbg

Following
  • Tech Notes

    Tech Notes

  • Lucy M.

    Lucy M.

  • Trey Huffine

    Trey Huffine

  • Eyal Trabelsi

    Eyal Trabelsi

  • Phillip Johnson

    Phillip Johnson

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech