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
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/...
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.