Explore >> Select a destination


You are here

hypirion.com
| | konradreiche.com
5.2 parsecs away

Travel
| | Writing a generic protobuf writer in Go is straightforward. We simply use proto.Marshal with the protobuf message because proto.Marshal expects the proto.Message interface, which all generated protobuf messages implement. However, when it comes to reading serialized protobuf data into a specific Go type, historically, we had to specify the type explicitly: var post pb.Post if err := proto.Unmarshal(b, &post); err != nil { return nil, err } This approach is clear and explicit: what you see is what you get. But what if you need a more generic solution? You might encounter a scenario similar to mine: a cache abstraction designed to handle different kinds of protobuf messages generically. My initial attempt looked like this:
| | lukesingham.com
6.5 parsecs away

Travel
| | These are my summary notes of 'A Tour of Go' - which is meant for people who are familiar with programming to have a quick tour
| | www.ardanlabs.com
7.1 parsecs away

Travel
| | Introduction I prefer to use relational (SQL) databases in general since they provide several features that are very useful when working with data. SQLite is a great choice since the database is a single file, which makes it easier to share data. Even though it's a single file, SQLite can handle up to 281 terabytes of data. SQLite also comes with a command line client called sqlite3 which is great for quick prototyping.
| | www.sethvargo.com
34.2 parsecs away

Travel
| Go 1.21 has some awesome new functionality that improves the developer experience and performance.