Boost Your Go Code Performance with These Pointer Optimization Quick Tips!
Whether you're new to Go or an experienced dev, these tips will help you make informed decisions when using pointers:
- Learn when it's safe (and fast) to return pointers to local variables
- Discover the performance impact of pointer vs value receivers on your structs
"Hype" is a powerful document compiler and generator that is based on the markdown syntax we all know!
Hype can:
- Include partials - This allows you to create modular technical documentation and re-use it. Write and maintain your technical documentation the same way you write and maintain your code base!
- Easily include code samples AND:
- validate correct syntax - never include an out of date code sample again!
- include the output of the code sample
- include code "partials" (we call them snippets) to highlight a specific peace of code.
- include "godoc" directly from your private repos into your documentation (no need to write that function documentation more than once)
- execute arbitrary shell commands and include them back in your document. How nice would it be to always make sure the output of your directory structure from running "tree" stays in sync with your project AND your documents!
- specify exit codes for code and command execution, allow for "bad" syntax and commands to be included in your documents
- validate that images or referenced assets exist
- use a github action to automatically compile your README based on document assets. This ensures that your readme always has the latest version of code samples, etc. See an example here: https://github.com/gopherguides/hype/blob/main/.github/workf...
The SLOG package just released in #golang 1.21 comes with many new enterprise features, such as level logging, structured logging, customizable output and so much more! Check out this article for all the new features!
In the release of #golang 1.21, the slices package will be officially added to the standard library. It includes many useful functions for sorting, managing, and searching slices. In this article, we will cover the more commonly used functions included in the Slices package.
Whether you're new to Go or an experienced dev, these tips will help you make informed decisions when using pointers:
- Learn when it's safe (and fast) to return pointers to local variables - Discover the performance impact of pointer vs value receivers on your structs