There are numerous blog posts about table-driven tests in Go. In this blog post, I want to show a technique we have recently started using in our unit tests. I saw it the first time when my friend Matt Layher introduced it to me at work, and since then, I
vacuum is the worlds fastest OpenAPI 3, OpenAPI 2 / Swagger linter and quality analysis tool. Built in go, it tears through API specs faster than you can think. vacuum is compatible with Spectral r...
This paper First appeared in My blog , if you think it's useful, please like the collection and let more friends see it. Recently, I developed a very simple tool, the total code is less than 200 lines. Today, briefly introduce it. What tool is this? It is a tool for visualizing Go Module depenUTF-8...
libopenapi is a fully featured, high performance OpenAPI 3.1, 3.0 and Swagger parser, library, validator and toolkit for golang applications. - pb33f/libopenapi
lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin (https://gin-gonic.github.io/gin/ ) to AWS Lambda and Amazon API Gateway. - GitHub - awslabs/aws-lambda-go-api-...
Go version 1.13 includes new functions to work with errors. These functions are expired by popular github.com/pkg/errors package. Let’s see if new wrapper can replace existing library.
If have a general #golang rule for the following code snippet.
I like the first call to Claim over the second.
General Rule:
When the API is only returning an error value and you are not using the short variable declaration operator ( := ), question the choice.
Linter checks if examples are testable (have an expected output) - GitHub - maratori/testableexamples: Linter checks if examples are testable (have an expected output)
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.
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
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?
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.
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