#267 — June 20, 2019

Read on the Web

Golang Weekly

Quick Go Performance Improvements — These tips are sold as "techniques you can use to significantly improve the performance of your program with little effort" which are exactly the sort of tips we want :-) Suggestions include reusing previously allocated objects, using strconv instead of fmt, and preferring methods that allow you to pass in byte slices.

Stephen Whitworth

Using go/analysis to Write a Custom Linter — The go/analysis package helps in the creation of checkers, like a linter, making writing tools to analyze Go much simpler.

Fatih Arslan

Do You Need Golang or Kubernetes Training? — We offer on-site corporate training for engineers that want to learn Go (Golang) or Kubernetes. Having trained over 4,000 engineers since 2013, we have carefully crafted these classes for students to get as much value as possible.

Ardan Labs sponsor

Go 'Creeping In' — Tim Bray works for Amazon but knows a thing or two about the BigTechCos relate to programming languages, and he says he’s seeing a lot of Go things happening with Go. This provoked an extensive Hacker News discussion which is more interesting than the piece itself.

Tim Bray

Wire 0.3.0: Compile-Time Dependency Injection for Go — Wire’s job is to simplify the management of initialization code when doing dependency injection. With this latest release, Wire goes into beta and promises API stability going forward.

Google

💻 Jobs

Go Backend Engineer - API Development (Berlin, Germany) — As a Go Backend Engineer, you will design and develop next-generation tooling to enhance our team's performance through technology.

Zalando

Land a New Dev Job on Vettery — Vettery specializes in tech roles and is completely free for job seekers.

Vettery

📘 Articles & Tutorials

Generating Sequence Diagrams From Tests in Go — If you are into sequence diagrams (and who isn’t?) this is a cool, relatively non-intrusive way to generate them for your Go project.

Infinity Works

Creating gRPC Interceptors in Go — When you’re working with HTTP APIs, having middleware to work with requests can be helpful - interceptors essentially act in the same way for gRPC instead.

David Bond

How to Deploy a Resilient Go App to DigitalOcean Kubernetes

DigitalOcean sponsor

Making a Smarter 'Smart' Thermostat with Go, Lambda, and SAM — While not a perfect fit, this is a great example of what you can do quickly today with serverless and a small amount of code.

Joshua Barratt

Handling Netlify Form Submissions with Go-Powered Lambda Functions — Netlify makes it easy to handle form submissions with AWS Lambda and you don’t even need an AWS account.

Camilo Payan

▶  Porting Go to netbsd/arm64 — The audio is poor and this is very niche, but I suspect a few of you will appreciate this as it digs into the problems involved in porting Go.

Maya Rashish

What Go Does and Does Not Have — The question is: Will the “does not have” list change at 2.0?

Amrit Pandey

Communicating Between Go and Python (or R)

Matthew Mahowald

An Easier Way to Run ASP.NET MVC 5 Apps on Linux with Go

Dominic St-Pierre

🔧 Tools & Code

govalidator: Validate Go Request Data with Simple Rules — Inspired by Laravel’s request validation.

Saddam H

gocov 1.0: A Code Coverage Reporting Tool — It’s been around for years but has just reached the 1.0 milestone (though the only update has been gaining a go.mod file).

Andrew Wilkins

BigCache 2.0: An Efficient Cache for Gigabytes of Data — A concurrent, evicting in-memory cache built in Go. There’s an HTTP server package available too if you want to make it available as a service.

Allegro Tech

Getting Started: Writing Data to InfluxDB

InfluxData sponsor

Olivia: An Open Source Neural Network-Based Chatbot

Olivia

webdav: Simple Go WebDAV Server — WebDAV is a protocol for remote file manipulation, but you already knew that.

Henrique Dias

go-xmpp: A Native Go XMPP Library — XMPP is a platform agnostic messaging and presence protocol.

Fluux

WGS84: Coordinate Conversion and Transformation — Well, I’ve learnt something today! WGS84, ETRS89, OSGB36 and DHDN2001 are all different geographic coordinate systems and this Go package allows you to transform them in various ways.

Malte Wrogemann

💡 Tip

How to automatically timeout your shell session
by Peter Cooper

This isn't even a Go tip but it was cool enough that I wanted to share it with you anyway. Indulge me, it's my newsletter 😂

Let's say you've got a terminal session open on Linux, macOS, or another Unix-like system, and it'd be convenient for it to automatically terminate itself if you don't use it for a certain number of seconds.. just set the TMOUT environment variable to the desired number of seconds, and you're good to go.

This could even be handy as a default setting on servers you SSH into for security reasons or simply to to discourage long running sessions. Put something like export TMOUT=300 in your ~/.bash_profile (or preferred shell's equivalent).

Note: I've tested that this works on bash, but it should also work in zsh, tcsh, ksh, etc.