Tag go
Building a Go RESTful API with design-first OpenAPI contracts (6 mins read).
How to use oapi-codegen
to generate an RESTful API using design-first OpenAPI and code generation.
Post details
Merge JSON objects to one (replaces only existent values) - GitHub - apapsch/go-jsonmerge: Merge JSON objects to one (replaces only existent values)
Post details
When programming, we often need to write ‘generic’ functions where the exact data type is not important. For example, you might want to write a simple function that sums up numbers. Go lacked this notion until recently, but it was recently added (as of version 1.18). So I took it out for a spin. In … Continue reading Go generics are not bad
Post details
Post details
A minor release of Go with a grab bag of nice improvements
Pointing to a fork of a Go module (1 mins read).
How to pin your Go modules to a given fork of a repository.
Post details
Go templates (text/template, html/template) accept a single argument to render. That’s generally enough when you’re executing them from Go code. But when invoking a template from another template, you often want to pass multiple things to it. For example, we might have a template that renders a nav bar item. It requires a title, a url, and an “enabled” bool. We want to invoke it from another template. How do you do that?
Running Go tests in Parallel (2 mins read).
How to get Go tests to run in parallel for speed.
Ignoring slow-running tests in Go (1 mins read).
How to use Go's -short
testing mode to avoid running slower tests.
Post details
The HTTP protocol is fast, secure, and reliable. However, it needs other protocols and services to work properly, and when things don’t go well it is necessary to have access to detailed information about the time spent in each step. The steps to make an HTTP call are as follows: DNS Lookup The client sends a DNS query to the DNS server. The DNS server responds with the IP for the name.
Shipping services more quickly with design-first OpenAPI contracts (8 mins read).
How using OpenAPI has led to being able to ship a new service more effectively, by removing the need to write scaffolding, and instead focus on the business logic.
Post details
I am working on a go project, which has a dependency on original-project. I now want to change the behavior in this project by modifying original-project. So I cloned github.com/y/original-project to
Automating boilerplate/scaffolding code with custom code generation in Go (4 mins read).
How to use Go's code generation tooling to add custom code generation to your project.
Post details
Go modules analysis tool. Contribute to Helcaraxan/gomod development by creating an account on GitHub.
Stubbing out the Go http.Client
to test an HTTP HandlerFunc
(2 mins read).
How to write a unit test to validate your router's HTTP handlers work, by stubbing out the http.Client
implementation.
Automagically determining feeds provided for a given URL on the command-line (1 mins read).
Creating a command-line application to discover feeds for a given URL.
Managing your Go tool versions with go.mod
and a tools.go
(3 mins read).
Better dependency management for your tools and without needing to go install
the tools before executing them.
Post details
Post details
Mutation testing for Go source code. Fork from https://github.com/zimmski/go-mutesting - GitHub - avito-tech/go-mutesting: Mutation testing for Go source code. Fork from https://github.com/zimmski/...
Post details
⚡️ Go 1.19 Beta 1 is released! ⚙️ Try it! File bugs! go.dev/issue/new 📣 Announcement: groups.google.com/g/golang-annou… 🚚 Download: go.dev/dl/#go1.19beta1 #golangGo (@golang)Fri, 10 Jun 2022 17:58 +0000
Post details
Writing a GitHub Action to bump Go depenendencies and put the change in a pull request.
Post details
Since the day it was open sourced in 2009, the Go programming language has consistently grown in popularity. Now the five Google software engineers behind its original creation are taking a look back at what fueled that growth.
Only testing your public API in a Go package (3 mins read).
How to test only exported parts of a package in Go.
Post details
Getting Go errors to work well with Sentry is hard. This post explains how we got them playing nicely by deduping stacktraces.
Post details
Golang WireMock admin client . Contribute to walkerus/go-wiremock development by creating an account on GitHub.
Post details
Introducing a library for OpenAPI contract testing with Go's net/http
package (2 mins read).
Creating a Go library that can verify net/http
handlers implement an OpenAPI contract, for use with testing.
Testing Go net/http
handlers (1 mins read).
How to write unit tests to validate an HTTP handler.
Post details
Generate type-safe code from SQL. Contribute to kyleconroy/sqlc development by creating an account on GitHub.
Post details
Go’s a great hammer for a lot of nails, one of the areas where I find it fitting is building HTTP servers.
Post details
Documenting my experiences and learnings, with the goal of helping other software engineers on their journey
Some really great posts here that have made it much easier for me to get started with Go!
Post details
In software engineering, over the years folks have developed many patterns, techniques and refactoring maneuvers.
Post details
Before we begin: The content in this article assumes knowledge of table-driven tests in Go.
Post details
Coming from Ruby, which has excellent testing tools and libraries, the notion of table-driven tests was unusual for me.
Getting the fingerprint of a certificate in Go (1 mins read).
How to retrieve an X.509 thumbprint from a remote server, in Go.
Getting the OpenID Connect thumbprint for AWS on the command-line with Go (2 mins read).
How to automagically retrieve an OpenID Connect thumbprint for use with AWS' OpenID Connect federated identity.
Post details
Easy to use OpenID Connect client and server library written for Go and certified by the OpenID Foundation - GitHub - zitadel/oidc: Easy to use OpenID Connect client and server library written for ...
Setting up a Go package structure for a combined library and CLI tool (2 mins read).
How to structure a Go repository to be both a library and command-line tool(s).
Should I commit generated Go code? (1 mins read).
Answering whether go:generate
d code should be committed (TL;DR is yes).
Post details
Contribute to hawx/indieauth development by creating an account on GitHub.
Post details
A report of my positive and negative experiences with Go after using it for 6 months at work.
Post details
In this article, we are going to look at some of the best practices that you should consider when structuring your Go applications.
Post details
Encore is the Go Backend Development Engine helping developers escape the maze of complexity. - GitHub - encoredev/encore: Encore is the Go Backend Development Engine helping developers escape the ...
Automagically setting the project version for Go projects in SonarQube (2 mins read).
How to automagically set sonar.projectVersion
for Go projects, based on Git tags.
Post details
Before we begin: The content in this article assumes knowledge of table-driven tests in Go.
Post details
Code coverage is the way of determining how much of the code is actually covered through the tests. This metric is extremely useful in determining what other