1
8
submitted 1 year ago by zquestz@lemm.ee to c/golang@programming.dev

So nice to finally have this built into toolchain.

2
6
3
7

In this article, I'll describe how to organize protobuf files messages and gRPC services in the Go sources. I'll briefly examine how to use protoc and plugins with the proper imports, and project structure.

4
13
5
8
6
11
submitted 1 year ago by tedu@azorius.net to c/golang@programming.dev

The new log/slog package in Go 1.21 brings structured logging to the standard library. Structured logs use key-value pairs so they can be parsed, filtered, searched, and analyzed quickly and reliably. For servers, logging is an important way for developers to observe the detailed behavior of the system, and often the first place they go to debug it. Logs therefore tend to be voluminous, and the ability to search and filter them quickly is essential.

7
11

While writing Go, you might might run into the following situation: You want to collect the results of a function in a slice. However, the function returns a pointer.

You might then ask yourself:

What kind of slice should I use? A slice of values or a slice of pointers?

Let’s make this a bit more concrete.

8
14

Not a hard question. It’s sum types! (Or enums, tagged unions, or whatever you want to call them).

9
25
Scripting with Go (bitfieldconsulting.com)

In this article we’ll explore a package called script that aims to sprinkle some Unix shell fairy dust on your Go programs.

10
29
submitted 1 year ago by tedu@azorius.net to c/golang@programming.dev

Boring is good. Boring is stable. Boring means being able to focus on your work, not on what’s different about Go. This post is about the important work we shipped in Go 1.21 to keep Go boring.

There will not be a Go 2 that breaks Go 1 programs. Instead, we are going to double down on compatibility, which is far more valuable than any possible break with the past. In fact, we believe that prioritizing compatibility was the most important design decision we made for Go 1.

11
8
12
19
Rust vs Go in 2023 (programming.dev)

Rust vs Go in 2023

Which is better, Rust or Go? Go or Rust? Which language should you choose for your next project in 2023, and why? How do the two compare in areas like performance, simplicity, safety, features, scale, and concurrency? What do they have in common, and where do they fundamentally differ? Let’s find out, in this friendly and even-handed comparison of Rust and Golang.

13
8

Is Go 1.21 already on your upgrade list? It should be!

In the tradition of Go, release 1.21 does not deliver loads of new language features but many improvements to the toolchain and the ecosystem.

14
2

Waiting for go1.21: Execution Tracing with < 1% Overhead

Learn about the upcoming go1.21 performance improvements that reduce the overhead of execution tracing from up to 20% to less than 1% for most applications.

15
3
16
12

Understanding Go 1.21 generics type inference

Breaking down the release notes, with concrete explanations and annotated examples

17
19
18
17

Definitely had some trouble parsing and understanding the meanings of the improvement list, though.

19
10
Iterators in Go (programming.dev)

Iterators in Go

This article describes a proposed extension to the Go language: range over func. The proposal is evolving, and this tutorial is a work in progress, so don’t forget to check back later for the latest developments.

20
6
21
15
22
14

Now this right here, is one sexy looking shell! 😍 :bash:

That feeling you get when you're API server spins up and only logs the good messages to STDOUT...it makes me feel all warm and fuzzy 🙃

Oh, and I totally went with #golang for my server... @golang is one of my true loves, what can I say?! I'd be remiss to not say that @NixOS is moving on up my list too 😉 🤘 #server #programming #nixos

23
29
submitted 1 year ago by zik@lemmy.world to c/golang@programming.dev
24
8
submitted 1 year ago by darkhz@lemm.ee to c/golang@programming.dev

Hello Lemmy,

InvidTUI is a cross platform Invidious client, which can:

  • Browse, play and download YouTube audio and video
  • Create, save and open m3u8 playlists
  • Interactively switch between instances
  • Change video and album art resolutions
  • View and manage user feed, playlists and subscriptions

Among many other features.

In addition to the above, it also has a menu system, so that users need not remember all the keybindings, and instead select the required option from the menu to perform the desired operation.

This release contains the following new features:

  • A HJSON based configuration format, where you can define custom keybindings as well
  • Faster JSON parsing, thanks to jsoniter
  • Create new folders and rename items within the filebrowser
  • Automatically or manually configure the download directory from within the application
  • Change thumbnail quality

I hope you enjoy this release, and any feedback is appreciated.

25
9
submitted 1 year ago by tedu@azorius.net to c/golang@programming.dev

The Go programming language has released its first Release Candidate (RC) for version 1.21, which is packed with new features, improvements, and performance enhancements. This article provides an overview of the notable changes and features in Go 1.21, along with some exciting additions to the standard library.

  • PGO
  • min, max functions
  • preview of loop capture change
  • new slog, slices, and map packages
  • WASI port
view more: next ›

Golang

0 readers
1 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 1 year ago
MODERATORS