Go Icon

Go

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

Goroland.zone

Benchmarking the M1 with the Go standard library

We are in a time where the open source tooling and developer story around Apple’s new M1 chip is all over our feeds. Among these was this interesting benchmark. It even highlights where a somewhat older Intel can still beat the M1, such as highly optimized crypto. In general, if your code relies on the Go parts more than native optimized code the M1 looks like a performance win.

Gogithub.com

Maddy – a composable all-in-one mail server

Maddy Mail Server implements all functionality required to run an email server. It can send messages via SMTP (works as MTA), accept messages via SMTP (works as MX) and store messages while providing access to them via IMAP. In addition to that it implements auxiliary protocols that are mandatory to keep email reasonably secure (DKIM, SPF, DMARC, DANE, MTA-STS).

It replaces Postfix, Dovecot, OpenDKIM, OpenSPF, OpenDMARC and more with one daemon with uniform configuration and minimal maintenance cost.

IMAP storage is still in beta, but this is one to watch as it could dramatically simplify your infrastructure.

Russ Coxgithub.com

Russ Cox's experimental new refactoring tool for Go

It’s just 18 commits deep at the time of logging, but when one of Go’s authors fires up a new project (and a refactoring tool at that), it’s worth following along to see what develops.

Just how raw is this effort? The README only states:

rf is an experimental refactoring tool. It is very much a work in progress. rf is incredibly rough and likely to be buggy and change incompatibly.

I gave the repo a quick cloneing to see what I could see, but go get failed due to a missing file reference so it’s definitely in a “wait and see” status unless you’re up for some hacking.

Opsgrafana.com

Grafana Tempo is a high volume, distributed tracing backend

Tempo is cost-efficient, requiring only object storage to operate, and is deeply integrated with Grafana, Prometheus, and Loki. Tempo can be used with any of the open source tracing protocols, including Jaeger, Zipkin, and OpenTelemetry. It supports key/value lookup only and is designed to work in concert with logs and metrics (exemplars) for discovery.

Add this to the incredibly impressive open source portfolio at Grafana Labs.

Gogithub.com

A Go unikernel running on x86 bare metal

Run a single Go applications on x86 bare metal, written entirely in Go (only a small amount of C and some assembly), support most features of Go (like GC, goroutine) and standard libraries, also come with a network stack that can run most net based libraries.

The entire kernel is a go application running on ring0. There are no processes and process synchronization primitives, only goroutines and channels. There is no elf loader, but there is a Javascript interpreter that can run js script files, and a WASM interpreter will be added to run WASM files later.

Goroutines correspond to processes and channels are used for inter-process communication (IPC). Also it runs JavaScript ¯\(ツ)

Chua Bok Woongithub.com

sq is a code-generated, type safe query builder and struct mapper for Go

From reading through the README, this seems like a nice balance between a full-blown ORM and hand-rolling all your own SQL. For example, this point from the The mapper function is the SELECT clause. section:

In sq whatever you SELECT is automatically mapped. This means you just have to write your query, execute it and if there were no errors, the data is already in your Go variables. No iterating rows, no specifying column scan order, no error checking three times. Write your query, run it, you’re done.

Terminalgithub.com

A fun, functional and stateful way to build terminal apps

Bubble Tea is built with Go, but it’s based on the Elm Architecture so it might not seem very Go-like at first, but the author thinks hopes you’ll see past that and realize that many of Go’s idioms are at play as well.

Bubble Tea is in use in production and includes a number of features and performance optimizations we’ve added along the way. Among those is a standard framerate-based renderer, a renderer for high-performance scrollable regions which works alongside the main renderer, and mouse support.

A fun, functional and stateful way to build terminal apps

Communicationsscreego.net

Screego is screen sharing for developers

In the past I’ve had some problems sharing my screen with coworkers using corporate chatting solutions like Microsoft Teams. I wanted to show them some of my code, but either the stream lagged several seconds behind or the quality was so poor that my colleagues couldn’t read the code. Or both.

That’s why I created screego. It allows you to share your screen with good quality and low latency. Screego is an addition to existing software and only helps to share your screen. Nothing else (:.

Test drive the demo right here.

Gogithub.com

Create beautiful system diagrams with Go

Go-Diagrams lets you turn this code:

d, err := diagram.New(diagram.Filename("app"), diagram.Label("App"), diagram.Direction("LR"))
if err != nil {
    log.Fatal(err)
}

dns := gcp.Network.Dns(diagram.NodeLabel("DNS"))
lb := gcp.Network.LoadBalancing(diagram.NodeLabel("NLB"))
cache := gcp.Database.Memorystore(diagram.NodeLabel("Cache"))
db := gcp.Database.Sql(diagram.NodeLabel("Database"))

dc := diagram.NewGroup("GCP")
dc.NewGroup("services").
    Label("Service Layer").
    Add(
        gcp.Compute.ComputeEngine(diagram.NodeLabel("Server 1")),
        gcp.Compute.ComputeEngine(diagram.NodeLabel("Server 2")),
        gcp.Compute.ComputeEngine(diagram.NodeLabel("Server 3")),
    ).
    ConnectAllFrom(lb.ID(), diagram.Forward()).
    ConnectAllTo(cache.ID(), diagram.Forward())

dc.NewGroup("data").Label("Data Layer").Add(cache, db).Connect(cache, db)

d.Connect(dns, lb, diagram.Forward()).Group(dc)

if err := d.Render(); err != nil {
    log.Fatal(err)
}

Into that diagram 👇

Create beautiful system diagrams with Go

Godonatstudios.com

Go Modules have a v2+ problem

Jesse Donat:

Go has a problem. Go modules place a strange naming requirement on modules version 2 or greater. Module names on modules v2+ must end in the major version ala …/v2, and communication of this rule has been weak. It’s non-obvious, and the community at large does not understand it.

I have seen many very large projects including Google owned projects get it wrong.

I brought the issue up at my local Go meetup, and no one had ever heard about the rule. They were very skeptical the rule existed at all.

Jesse goes on to tell the history, explain the problem in-depth, and suggest next steps for the Go Community.

Databasesgithub.com

Graviton is like ZFS for key-value stores

Graviton Database is simple, fast, versioned, authenticated, embeddable key-value store database in pure Go… Every write is tracked, versioned and authenticated with cryptographic proofs. Additionally it is possible to take snapshots of database. Also it is possible to use simple copy,rsync commands for database backup even during live updates without any possibilities of database corruption.

Still in Alpha, but a lot of work has been done and there are features a-plenty.

Rob Pikeopensource.googleblog.com

New case studies about Google’s use of Go

From Rob Pike on Google’s Open Source Blog:

In the past year, we’ve posted sixteen case studies from end users around the world talking about how they use Go to build fast, reliable, and efficient software at scale. Today, we are adding three new case studies from teams inside Google:

  • Core Data Solutions: Google’s Core Data team replaced a monolithic indexing pipeline written in C++ with a more flexible system of microservices, the majority of them written in Go, that help support Google Search.
  • Google Chrome: Mobile users of Google Chrome in lite mode rely on the Chrome Optimization Guide server to deliver hints for optimizing page loads of well-known sites in their geographic area. That server, written in Go, helps deliver faster page loads and lowered data usage to millions of users daily.
  • Firebase: Google Cloud customers turn to Firebase as their mobile and web hosting platform of choice. After joining Google, the team completely migrated its backend servers from Node.js to Go, for the easy concurrency and efficient execution.

Want to share your story about how your team or organization uses Go? Share your story here.

Denis Sedchenkogoplay.tools

Creating a better version of The Go Playground

Greetings, Go devs!

I often find myself thinking that I often encounter a situation when I need to do some small prototyping (playing with goroutines, etc.) and Go’s playground often is a faster solution than a dedicated IDE window. Unfortunately play.golang.org is very primitive (goplay.space is better but not much), so I’ve decided to try to create something a bit better.

A few months ago I decided to try to create a better version of Go playground that will have a small valuable set of features that make prototyping comfortable enough, such as basic code autocomplete (stdlib only supported), syntax check, snippets and examples. Also as Go in WebAssembly trend starts to grow, WebAssembly support was added.

In addition, users can customize the editor by enabling font ligatures, selecting editor font, and some other small subset of options.

I would like to know your opinion and get some feedback. Source code here. Contribution is appreciated!

Gogithub.com

Olric lets you instantly create a fast, scalable, shared pool of RAM across a cluster of computers

Can be used as an embeddable Go library or as a language-agnostic service. Here’s their list of use cases:

With this feature set, Olric is suitable to use as a distributed cache. But it also provides distributed topics, data replication, failure detection and simple anti-entropy services. So it can be used as an ordinary key/value data store to scale your cloud application.

Patrick DeVivoaskgit.com

AskGit - query your git repo with SQL

Built in Go, askgit is an open source CLI and coming soon web interface (linked above). With this tool in your toolbox, you can mine your repo for info like commit count by author on each day of the week:

SELECT
    count(*) AS commits,
    count(CASE WHEN strftime('%w',author_when)='0' THEN 1 END) AS sunday,
    count(CASE WHEN strftime('%w',author_when)='1' THEN 1 END) AS monday,
    count(CASE WHEN strftime('%w',author_when)='2' THEN 1 END) AS tuesday,
    count(CASE WHEN strftime('%w',author_when)='3' THEN 1 END) AS wednesday,
    count(CASE WHEN strftime('%w',author_when)='4' THEN 1 END) AS thursday,
    count(CASE WHEN strftime('%w',author_when)='5' THEN 1 END) AS friday,
    count(CASE WHEN strftime('%w',author_when)='6' THEN 1 END) AS saturday,
    author_email
FROM commits GROUP BY author_email ORDER BY commits
0:00 / 0:00