Here is a record of Go language-related content worth sharing every week, released on Sunday. This week's journal is open source (GitHub: polaris1119/golangweekly [1] ). Contributions are welcome. Recommend or self-recommended articles/software/resources, etc. Please submit issue [2] .

In view of the fact that some people may not be able to insist on reading the English articles, the weekly will recommend high-quality Chinese articles as much as possible. Excellent English articles, translated by our GCTT organization.

Since the WeChat official account does not support external links, a large number of links in the article can be viewed through " Read the original text " at the end of the article .

picture

Title image: gum

first sentence

The questions in the previous issue are relatively simple and the accuracy rate is relatively high. Take a look together.

What does the following code output?

package main

import "fmt"

func main() {
 const c = 8
 a := &c
 *a = 12
 fmt.Println(*a)
}

A: 8; B: cannot compile; C: 12

Correct Answer: B. The error reported is: invalid operation: cannot take address of c (untyped int constant 8).

Check out this topic. What does the following code output?

package main

import "fmt"

func main() {
 a := []int{789}
 fmt.Println(a[real(2)])
}

News

1. sqlite 1.18.0 released [3]

An in-process implementation of a self-contained, serverless, zero-configuration transactional SQL database engine.

2. Go Micro 4.8 released [4]

Distributed Systems Framework.

3. sonic 1.3.4 released [5]

Byte open source high-performance json codec library.

4. bud 0.2.3 released [6]

A full stack framework.

5. chromedp 0.8.3 released [7]

Go library for driving the browser, supporting the Chrome DevTools protocol. Crawl dynamic webpage tool.

6. Milvus 2.1 released [8]

An open source vector database for embedding similarity search and artificial intelligence applications.

7. Buf 1.7 released [9]

A new Protobuf processing library.

8. fq 0.0.8 released [10]

Tools, languages ​​and decoders for examining binary data, similar to jq.

9. imgproxy 3.7 released [11]

An image proxy gateway written in Go language, which can proxy remote images, and provides format conversion and size scaling functions.

article

1. Go's new memory model [12]

This change in Go 1.19 was first proposed last year by Russ Cox in an article [13] , with some modifications to the Go memory model to make it more consistent with other languages ​​such as C, C++, and Rust, as well as sync/ Some new types in the atomic package.

2. GoLand 2022.2 is officially released

 Better, comprehensive support for generics and  fuzzing was added .go.work

3. One of the Go daily libraries is a fun Go language REPL tool

A very interesting Go language REPL (read-eval-print-loop) tool.

4. Take you to completely defeat the skip table principle and its Golang implementation! (with diagrams)

This article is based on my personal in-depth exploration of the principle of skipping, and realizes a basic understanding and practice of skipping through golang.

5. How to implement Golang DES encryption and decryption?

This article introduces the principle and function of DES encryption, and the corresponding implementation of the DES encryption and decryption mechanism in golang.

6. The 30,000-word long text will take you hand in hand to build a Go ORM framework from 0!

This article mainly starts from the basic principles, to the step-by-step implementation, and then completes the entire simple and elegant MySQL ORM.

7. How to use the Elastic APM Go agent to load measurement tools for Go applications

In this article, we'll examine how to use Elastic APM to load a Go application with measurement tools to capture detailed response time performance data (tracing), capture infrastructure and application metrics, and integrate with logs - the three essentials for observability .

8. Master this trick, you don't have to worry about the management of the Go version

Today I bring a short article about the Go version manager gvm.

open source project

1. hlive [14]

HLive is a server-side WebSocket based dynamic templateless view layer.

2. gin-rate-limit [15]

The rate limit of the Gin framework.

3. Drafts [16]

Application skeleton for developing ebpf programs in Go.

Resources && Tools

1. Speedbump [17]

A TCP proxy for simulating variable network latency.

2. gobackup [18]

Simple tool to backup database, files to FTP/SCP/S3 storage.

3. Go Time Issue 240 [19]

What's new in Go 1.19?

4. gum [20]

A tool for making charming shell scripts.

5. litefs [21]

A sqlite replication tool implemented in Go.

subscription

This weekly is published every Sunday, and is updated simultaneously on the Go language Chinese website [22] and the WeChat public account [23] .

Search "Go Language Chinese Network" on WeChat or scan the QR code to subscribe.

picture

wechat

References

[1]

polaris1119/golangweekly: https://github.com/polaris1119/golangweekly

[2]

File an issue: https://github.com/polaris1119/golangweekly/issues

[3]

sqlite 1.18.0 released: https://gitlab.com/cznic/sqlite

[4]

Go Micro 4.8 released: https://github.com/asim/go-micro

[5]

sonic 1.3.4 released: https://github.com/bytedance/sonic

[6]

bud 0.2.3 released: https://github.com/livebud/bud

[7]

chromedp 0.8.3 released: https://github.com/chromedp/chromedp

[8]

milvus 2.1 release: https://github.com/milvus-io/milvus

[9]

Buf 1.7 released: https://github.com/bufbuild/buf

[10]

fq 0.0.8 released: https://github.com/wader/fq

[11]

imgproxy 3.7 released: https://github.com/imgproxy/imgproxy

[12]

Go's new memory model: https://tip.golang.org/ref/mem

[13]

In one article: https://research.swtch.com/gomm

[14]

hlive: https://github.com/SamHennessy/hlive

[15]

gin-rate-limit: https://github.com/JGLTechnologies/gin-rate-limit

[16]

drafts: https://github.com/rafaeldtinoco/drafts

[17]

speedbump: https://github.com/kffl/speedbump

[18]

gobackup: https://github.com/huacnlee/gobackup

[19]

Go Time Issue 240: https://changelog.com/gotime/240

[20]

gum: https://github.com/charmbracelet/gum

[twenty one]

litefs: https://github.com/superfly/litefs

[twenty two]

Go language Chinese website: https://studygolang.com/go/weekly

[twenty three]

WeChat Official Account: https://weixin.sogou.com/weixin?query=Go%E8%AF%AD%E8%A8%80%E4%B8%AD%E6%96%87%E7%BD%91