Great article about reverse engineering and debugging GoLang runtime - they explain some ways about profiling throughout different platforms
https://marcan.st/2017/12/debugging-an-evil-go-runtime-bug/
https://marcan.st/2017/12/debugging-an-evil-go-runtime-bug/
marcan.st
Debugging an evil Go runtime bug
From heat guns to kernel compiler flags
Unit testing and TDD: 5 of simple tips and tricks for improving your tests
1. Put your tests in a different package
2. Internal tests go in a different file
3. Run all tests on save
4. Write table driven tests
5. Mock things using Go code
https://medium.com/@matryer/5-simple-tips-and-tricks-for-writing-unit-tests-in-golang-619653f90742?source=linkShare-b636419a57de-1516079991
1. Put your tests in a different package
2. Internal tests go in a different file
3. Run all tests on save
4. Write table driven tests
5. Mock things using Go code
https://medium.com/@matryer/5-simple-tips-and-tricks-for-writing-unit-tests-in-golang-619653f90742?source=linkShare-b636419a57de-1516079991
Medium
5 simple tips and tricks for writing unit tests in #golang
Test-driven development is a great way to keep the quality of your code high, while protecting yourself from regression and proving to…
Hello, gophers! What is the best GoLang IDE/software for coding?
anonymous poll
VS Code – 107
👍👍👍👍👍👍👍 41%
Jetbrains GoLand – 103
👍👍👍👍👍👍👍 40%
VIM 😬 – 25
👍👍 10%
Sublime text + plugins – 9
👍 3%
Other – 8
👍 3%
Atom + plugins – 7
▫️ 3%
👥 259 people voted so far.
anonymous poll
VS Code – 107
👍👍👍👍👍👍👍 41%
Jetbrains GoLand – 103
👍👍👍👍👍👍👍 40%
VIM 😬 – 25
👍👍 10%
Sublime text + plugins – 9
👍 3%
Other – 8
👍 3%
Atom + plugins – 7
▫️ 3%
👥 259 people voted so far.
👍1
Simple and complete explanation about goroutines and concurrency in GoLang. Graphs, interactive visualizations are available 😉
https://divan.github.io/posts/go_concurrency_visualize/
https://divan.github.io/posts/go_concurrency_visualize/
One of the most featured articles on the Medium from CEO smsjunk.com and Chief Architect Officer at KnowBe4. He designed a new backend for handling 1 million JSON POST RPM and saving them into Amazon S3. Of course, he used goroutines, channels, parallel computing and other GoLang features. Enjoy reading!
https://medium.com/smsjunk/handling-1-million-requests-per-minute-with-golang-f70ac505fcaa
https://medium.com/smsjunk/handling-1-million-requests-per-minute-with-golang-f70ac505fcaa
Medium
Handling 1 Million Requests per Minute with Golang
I have been working in the anti-spam, anti-virus and anti-malware industry for over 15 years at a few different companies, and now I know…
Must-read official article about arrays, slices and strings in GoLang
https://blog.golang.org/slices
https://blog.golang.org/slices
Go best practices, six years in; article by Peter Bourgon
This article was originally a talk at QCon London 2016; If you want to save your time you can just look through these points:
1. Put $GOPATH/bin in your $PATH, so installed binaries are easily accessible.
2. Put library code under a pkg/ subdirectory. Put binaries under a cmd/ subdirectory.
3. Always use fully-qualified import paths. Never use relative imports.
4. Defer to Andrew Gerrand’s naming conventions.(https://talks.golang.org/2014/names.slide)
5. Only func main has the right to decide which flags are available to the user.
6. Use struct literal initialization to avoid invalid intermediate state. Inline struct declarations where possible.
7. Avoid nil checks via default no-op implementations.
8. Make the zero value useful, especially in config objects.
9. Make dependencies explicit!
10. Loggers are dependencies, just like references to other components, database handles, commandline flags, etc.
11. Use many small interfaces to model dependencies.
12. Tests only need to test the thing being tested.
13. Use a top tool to vendor dependencies for your binary.
14. Libraries should never vendor their dependencies.
15. Prefer go install to go build.
See more details and examples:
https://peter.bourgon.org/go-best-practices-2016/
This article was originally a talk at QCon London 2016; If you want to save your time you can just look through these points:
1. Put $GOPATH/bin in your $PATH, so installed binaries are easily accessible.
2. Put library code under a pkg/ subdirectory. Put binaries under a cmd/ subdirectory.
3. Always use fully-qualified import paths. Never use relative imports.
4. Defer to Andrew Gerrand’s naming conventions.(https://talks.golang.org/2014/names.slide)
5. Only func main has the right to decide which flags are available to the user.
6. Use struct literal initialization to avoid invalid intermediate state. Inline struct declarations where possible.
7. Avoid nil checks via default no-op implementations.
8. Make the zero value useful, especially in config objects.
9. Make dependencies explicit!
10. Loggers are dependencies, just like references to other components, database handles, commandline flags, etc.
11. Use many small interfaces to model dependencies.
12. Tests only need to test the thing being tested.
13. Use a top tool to vendor dependencies for your binary.
14. Libraries should never vendor their dependencies.
15. Prefer go install to go build.
See more details and examples:
https://peter.bourgon.org/go-best-practices-2016/
peter.bourgon.org
Peter Bourgon · Go best practices, six years in
Generally good things to do when writing Go code, in 2016 and beyond.
