Optional configuration for configuring Go code (2 mins read).
How to use optional types to allow configuring your library's Go code.
Optional configuration for configuring Go code (2 mins read).
How to use optional types to allow configuring your library's Go code.
I’m leaving my role as the Product Lead for the Go Language at Google. I’m super proud of everything the Go team has accomplished in the last six years, and I’ve never been more excited for Go’s future. Read on if you’re interested in what led me to my decision, what I’ll be doing next, and what I’ll miss about my time at Google. Go has been my passion for the past 10 years Ten years ago, I used Go for the first time.
Go OAuth 2.0 Introspection Client Middleware. Contribute to srikrsna/oauth-introspection development by creating an account on GitHub.
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.
Merge JSON objects to one (replaces only existent values) - GitHub - apapsch/go-jsonmerge: Merge JSON objects to one (replaces only existent values)
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
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.
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.
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.
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.
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.
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/...
⚡️ 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
Writing a GitHub Action to bump Go depenendencies and put the change in a pull request.
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.
Getting Go errors to work well with Sentry is hard. This post explains how we got them playing nicely by deduping stacktraces.
Golang WireMock admin client . Contribute to walkerus/go-wiremock development by creating an account on GitHub.
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.
Generate type-safe code from SQL. Contribute to kyleconroy/sqlc development by creating an account on GitHub.
Go’s a great hammer for a lot of nails, one of the areas where I find it fitting is building HTTP servers.
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!
In software engineering, over the years folks have developed many patterns, techniques and refactoring maneuvers.
Before we begin: The content in this article assumes knowledge of table-driven tests in Go.
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.
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).
Contribute to hawx/indieauth development by creating an account on GitHub.
A report of my positive and negative experiences with Go after using it for 6 months at work.
In this article, we are going to look at some of the best practices that you should consider when structuring your Go applications.
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 ...