Go Icon

Go

Go is a programming language built to resemble a simplified version of the C programming language.
278 Stories
All Topics

Go github.com

Fiber – an Express inspired web framework for gophers

I know the Go community isn’t one for frameworks, but as a long time framework user myself, I’ve never quite understood the resistance. Fiber doesn’t hide the ball. It comes right out and says “this is a web framework written in Go”. Here’s the philosophy behind that:

New gophers that make the switch from Node.js to Go are dealing with a learning curve before they can start building their web applications or microservices. Fiber, as a web framework, was created with the idea of minimalism and follow UNIX way, so that new gophers can quickly enter the world of Go with a warm and trusted welcome.

Fiber is inspired by Express, the most popular web framework on the Internet. We combined the ease of Express and raw performance of Go. If you have ever implemented a web application on Node.js (using Express or similar), then many methods and principles will seem very common to you.

Rust blog.discordapp.com

Why Discord is switching from Go to Rust

The TLDR of their reasoning is Go’s garbage collection was causing performance problems at scale. Since Rust doesn’t have a garbage collector, it allowed the team to manage their memory use more effectively. Their results were… uplifting:

Remarkably, we had only put very basic thought into optimization as the Rust version was written. Even with just basic optimization, Rust was able to outperform the hyper hand-tuned Go version. This is a huge testament to how easy it is to write efficient programs with Rust compared to the deep dive we had to do with Go.

This is not a Go sucks switch to Rust story. It is a well-reasoned argument for using one technology over the other when it makes sense to do so.

When starting a new project or software component, we consider using Rust. Of course, we only use it where it makes sense.

Dave Cheney the-zen-of-go.netlify.com

The Zen of Go

Dave Cheney’s ten engineering values for writing simple, readable, and maintainable Go code. Some of these apply outside of Go, as well. For instance, Simplicity matters:

Simplicity is not a synonym for unsophisticated. Simple doesn’t mean crude, it means readable and maintainable. When it is possible to choose, defer to the simpler solution.

(Originally presented at GopherCon Israel 2020.)

Go Time Go Time #116

Unusual uses for Go: GUIs

Johnny and Jon are joined by Andy Williams to talk about some of the unusual ways developers are using Go. In this particular episode they deep dive into building GUIs and discuss all of the challenges imposed by trying to build a UI that is both cross platform and functional. How do you create buttons that work on both mobile and a desktop app? Should you even be designing both apps at the same time? Tune in to find out!

GitHub github.com

The official GitHub CLI is now in beta

gh brings many of GitHub’s concepts to the terminal. You know, things like pull requests and issues. The tool is still under heavy development and they’re looking for feedback. If you’re an early adopter, this is the perfect time to get involved and let your voice be heard. Oh, and if you’ve been using hub for years already, here’s how the new shiny compares:

gh is a new project for us to explore what an official GitHub CLI tool can look like with a fundamentally different design. While both tools bring GitHub to the terminal, hub behaves as a proxy to git and gh is a standalone tool.

The official GitHub CLI is now in beta

Robert Griesemer blog.golang.org

Proposals for Go 1.15

Robert Griesemer writes on the Go blog for the Go team.

We are close to the Go 1.14 release, planned for February assuming all goes well, with an RC1 candidate almost ready. … The primary goals for Go remain package and version management, better error handling support, and generics. Module support is in good shape and getting better with each day, and we are also making progress on the generics front (more on that later this year)…

Brad Fitzpatrick bradfitz.com

Brad Fitzpatrick is leaving Google

But why?

Little bored. Not learning as much as I used to. I’ve been doing the same thing too long and need a change. It’d be nice to primarily work in Go rather than work on Go.

When I first joined Google it was a chaotic first couple years while I learned Google’s internal codebase, build system, a bunch of new languages, Borg, Bigtable, etc. Then I joined Android it was fun/learning chaos again. Go was the same when I joined and it was a new, fast-moving experiment. Now Go is very popular, stable…

Go github.com

Simple web statistics. No tracking of personal data

GoatCounter is a web analytics platform, roughly similar to Google Analytics or Matomo. It aims to give meaningful privacy-friendly web analytics for business purposes, while still staying usable for non-technical users to use on personal websites. The choices that currently exist are between freely hosted but with problematic privacy (e.g. Google Analytics), hosting your own complex software or paying $19/month (e.g. Matomo), or extremely simplistic “vanity statistics”.

There’s a free hosted offering for non-commercial use. For those running businesses, self-host the thing. Live demo here.

Go Time Go Time #113

Go at Cloudflare

Jaana, Jon, and Mat are joined by John Graham-Cumming, the CTO of Cloudflare, to discuss Go at Cloudflare along with John’s unique involvement in Gordon Brown’s apology to Alan Turing. How did Cloudflare get started with Go? What problems do they use Go for and when to they turn to other languages? And how exactly did John’s petition for an apology to Turing get so popular?

Go Time Go Time #112

defer GoTime()

Mat, Carmen, and Jon are joined by Dan Scales to talk about Mat’s favorite keyword in Go - defer. Where did the defer statement come from? What problems can it solve? How has it shaped how we write Go code? How are other languages solving similar problems? And what exactly was changed in Go 1.14 to improve the performance of defer?

Filippo Valsorda github.com

age is a simple, modern, and secure file encryption tool

It features small explicit keys, no config options, and UNIX-style composability.

$ age-keygen -o key.txt
Public key: age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p
$ tar cvz ~/data | age -r age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p > data.tar.gz.age
$ age -d -i key.txt data.tar.gz.age > data.tar.gz

If Rust is more your thing, check out the perfectly named port: rage.

Go blog.jse.li

Building a BitTorrent client from the ground up in Go

What is the complete path between visiting thepiratebay and sublimating an mp3 file from thin air? In this post, we’ll implement enough of the BitTorrent protocol to download Debian.

It isn’t a full-fledged client (no magnet links, no multi-file torrents, no seeding), but that makes it an excellent candidate for reading and learning. Here’s the resulting source code.

Kubernetes github.com

A chaos engineering platform for Kubernetes

Chaos Mesh is a cloud-native Chaos Engineering platform that orchestrates chaos on Kubernetes environments. At the current stage, it has the following components:

  • Chaos Operator: the core component for chaos orchestration. Fully open sourced.
  • Chaos Dashboard: a visualized panel that shows the impacts of chaos experiments on the online services of the system; under development; curently only supports chaos experiments on TiDB(https://github.com/pingcap/tidb).

For the uninitiated, chaos engineering is when you unleash havoc on your system to prove out its resiliency (or lack thereof).

A chaos engineering platform for Kubernetes

Go github.com

A better way to handle, trace, and log errors in Go

This package is intended to give you more control over error handling via error wrapping, stack tracing, and output formatting. Basic error wrapping was added in Go 1.13, but it omitted user-friendly Wrap methods and built-in stack tracing. Other error packages provide some of the features found in eris but without flexible control over error output formatting. This package provides default string and JSON formatters with options to control things like separators and stack trace output. However, it also provides an option to write custom formatters via eris.Unpack.

Go github.com

A static website "generator" that lets you use servers and frameworks you already know

The scare quotes around generator are there because Staticgen doesn’t actually generate a static site for you. Instead, it downloads your dynamic site and produces a static version of it. A slightly new twist on an old idea:

If you’re unfamiliar, you can actually use the decades-old wget command to output a static website from a dynamic one, this project is purpose-built for the same idea, letting your team to use whatever HTTP servers and frameworks you’re already familiar with, in any language.

It is not without its caveats (no JavaScript rendering is a big one), but this could be useful in many circumstances you may find yourself in.

0:00 / 0:00