Disable Slog Messages in Go Tests 🤓
slog package was added to Go 1.23, which improves logging capabilities and allows you to abandon many third-party solutions.
In this short note, the author provides code that makes a mock logger for tests. Bookmark it!
Link to the note
#go #go@digest_golang #note #note@digest_golang
slog package was added to Go 1.23, which improves logging capabilities and allows you to abandon many third-party solutions.
In this short note, the author provides code that makes a mock logger for tests. Bookmark it!
Link to the note
#go #go@digest_golang #note #note@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1🔥9❤3❤🔥1
Go Protobuf: The new Opaque API 🤓
A new article in the official go blog talks about a new way to generate .pb.go files when working with grpc - Opaque API. The new API allows you to use less memory and use it more efficiently, adds laze decoding optimizations, optimizes work with pointers, and adds many other useful changes.
A must read if you use grpc in your projects!
Link to the article
#go #go@digest_golang #note #note@digest_golang
A new article in the official go blog talks about a new way to generate .pb.go files when working with grpc - Opaque API. The new API allows you to use less memory and use it more efficiently, adds laze decoding optimizations, optimizes work with pointers, and adds many other useful changes.
A must read if you use grpc in your projects!
Link to the article
#go #go@digest_golang #note #note@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1👍7🔥5
Coming in Go 1.24: testing/synctest experiment for time and concurrency testing ❤️
Go 1.24, which will be released in February, will include the testing/synctest package, which greatly improves timing testing. The package contains a Run function that allows testing code in a "bubble". The time inside the "bubble" is controlled by the Go runtime.
In this article, the author shows what problems this package will fix and how it will help with testing parallel code.
Link to the article
#go #go@digest_golang #note #note@digest_golang
Go 1.24, which will be released in February, will include the testing/synctest package, which greatly improves timing testing. The package contains a Run function that allows testing code in a "bubble". The time inside the "bubble" is controlled by the Go runtime.
In this article, the author shows what problems this package will fix and how it will help with testing parallel code.
Link to the article
#go #go@digest_golang #note #note@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
1🔥6👍4🥰1