Go
19.5K subscribers
14 photos
143 links
// admin @denniselite
go func() { channel <- news }()
news := <-channel
fmt.Sprintf("%s", news)
Download Telegram
Go pinned «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…»
Simple and complete explanation about goroutines and concurrency in GoLang. Graphs, interactive visualizations are available 😉

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
Must-read official article about arrays, slices and strings in GoLang

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/
Go + microservices + docker containers - good article about building and understanding the infrastructure of GoLang services on the Rest API.

Main points of the manual:
- Build Go Restful API with echo framework;

- Build Go binary on golang base image with Docker;

- Build lightweight image (Alpine) holding Go binaries;

- Create containers with Docker

https://hackernoon.com/golang-docker-microservices-for-enterprise-model-5c79addfa811
Do you want to read something about GoLang? Here is a list of GoLang books for everyone from beginners to advanced levels

https://github.com/dariubs/GoBooks
Joey Clover tells about problems of microservices development and management. Key-points in his article are:


- What are the microservices?
- Why are they hard?
- Is it true that you can use any language for microservices development?
- How should services communicate each other?
- Reasons for the migrating from monolithic application to microservice architecture

https://hackernoon.com/microservices-are-hard-an-invaluable-guide-to-microservices-2d06bd7bcf5d?source=linkShare-b636419a57de-1516468517
Tips, tricks and good advices about a memory management in GoLang in the “Allocation Efficiency in High-Performance Go Services” article by the Segment company. You’ll know:
- best way to use pointers in code;
- memory allocation complexity in heap and stack;
- Slice memory-optimisation tricks;
- and more 😉

https://segment.com/blog/allocation-efficiency-in-high-performance-go-services/
Are you a beginner in GoLang? Then it requires your attention 🙂.
Good and simple for understanding article about microservice-based API development; just simple and work solution with code examples and couple of advices

#development #microservices #architecture #practice

https://medium.com/@thedevsaddam/build-restful-api-service-in-golang-using-gin-gonic-framework-85b1a6e176f3?source=linkShare-b636419a57de-1516910445
GoLang 1.10 Release notes has been added!

Go 1.10 is not yet released. These are work-in-progress release notes. Go 1.10 is expected to be released in February 2018.

This release:
- caching of built packages;
- adds caching of successful test results;
- runs vet automatically during tests;
- permits passing string values directly between Go and C using cgo.

#golang #news #releases
See more:
https://tip.golang.org/doc/go1.10
Everybody use dependencies and third-party packages but what is the best way to use it? GopherAcademy helps to understand best practice for the vendor folder organization. Of course, code examples and theory points are included 🙂

#development #basics #manual

https://blog.gopheracademy.com/advent-2015/vendor-folder/
A presentation by Russ Cox in the MIT University: Go’s memory model

#development #memory_management

https://nil.csail.mit.edu/6.824/2016/notes/gomem.pdf