1 repost 787.

banging errors in go

flak.tedunangst.com/post/bango

Tedu wrote a tool that lets you handle errors in Go like this:

func decomp(filename string) ([]byte, error) {
        fd := ^os.Open(filename)
        defer fd.Close()
        zd := ^gzip.NewReader(fd)
        data := ^io.ReadAll(zd)
        return data, nil
}

Funky!