One more introduction to Go: Why and how to write good Go code.
Author: Francesc Campoy,
VP of Product & Developer Relations
Developer Advocate at Google, Go team, Google Cloud platform
https://speakerdeck.com/campoy/an-introduction-to-go-cern
Author: Francesc Campoy,
VP of Product & Developer Relations
Developer Advocate at Google, Go team, Google Cloud platform
https://speakerdeck.com/campoy/an-introduction-to-go-cern
Speaker Deck
An Introduction to Go (CERN)
A three-parts talk, each of one hour, covering the basic aspects of Go including type system, concurrency, standard library, and tooling.
There was a…
There was a…
Hello, channel. Recently I’ve played with concurrency data processing in go: let’s say how to split a bunch of data to 1,2...N pieces and process it concurrently and then once everything is done continue normal execution. For those types of issues I used `channels` before and tried to design my own solution every time. But somehow, suddenly, I found a good explanation of how to use `sync.WaitGroup` and it looks like a charm! It’s not a new feature, really easy to use, but by some reason I’ve never tried to use it for some reason 😀 So here is an article:
https://tutorialedge.net/golang/go-waitgroup-tutorial/
and a short example of how it could be ▶️ https://gist.github.com/denniselite/b9c62ee0366d3f63f9f6015a68af1db3
https://tutorialedge.net/golang/go-waitgroup-tutorial/
and a short example of how it could be ▶️ https://gist.github.com/denniselite/b9c62ee0366d3f63f9f6015a68af1db3
TutorialEdge.net
Go WaitGroup Tutorial
In this tutorial, we'll be looking at how you can leverage WaitGroups within your Concurrent Go Applications
If you feel like you mastered Go, you might want to expand your skillset. Guys from @thefrontend share a lot of useful tips and tricks, inspirational UI/UX, news and throw occasional quizzes around web and mobile dev for you to participate!
Have a quick look🔥
t.iss.one/thefrontend
Have a quick look🔥
t.iss.one/thefrontend
Telegram
TheFrontEnd🔥
📝 Articles
🗞 News
👓 Tutorials
🤔 UI/UX thoughts
on front end💡 mobile📱 and web dev 🖥
Admin: @masant1
🗞 News
👓 Tutorials
🤔 UI/UX thoughts
on front end💡 mobile📱 and web dev 🖥
Admin: @masant1
A quite interesting proposal was raised last month regarding error handling in Go:
The try built-in function takes n+1 arguments (where n may be zero) where the last argument must be of type error. It returns the first n arguments (if any) if the (final) error argument is nil, otherwise it returns from the enclosing function with that error. For instance, code such as
can be simplified to
Check it out:
https://github.com/golang/go/issues/32437
Full proposal description is located here: https://github.com/golang/proposal/blob/master/design/32437-try-builtin.md
The try built-in function takes n+1 arguments (where n may be zero) where the last argument must be of type error. It returns the first n arguments (if any) if the (final) error argument is nil, otherwise it returns from the enclosing function with that error. For instance, code such as
f, err := os.Open(filename)
if err != nil {
return …, err // zero values for other results, if any
}
can be simplified to
f := try(os.Open(filename))
Check it out:
https://github.com/golang/go/issues/32437
Full proposal description is located here: https://github.com/golang/proposal/blob/master/design/32437-try-builtin.md
GitHub
Proposal: A built-in Go error check function, "try" · Issue #32437 · golang/go
Proposal: A built-in Go error check function, try This proposal has been closed. Thanks, everybody, for your input. Before commenting, please read the detailed design doc and see the discussion sum...
Unrelated to GoLang but it’s still interesting to get familiar with https://link.medium.com/60H2RCl8OY
Medium
Drawing the line for “don’t roll own crypto”
This post, just like the most of my other posts, was triggered by a tweet. In https://twitter.com/Jogenfors/status/969566190858326022…
Golang 1.13 has been released last week! 🚀
Feel free to check the updates by the link:
https://blog.golang.org/go1.13
In short, there is a list of major changes:
- The go command now downloads and authenticates modules using the Go module mirror and Go checksum database by default
- Improvements to number literals
- Error wrapping
- TLS 1.3 on by default
- Improved modules support
PS In my point of view, Error handling is one of the most important syntax changes, so I’d just want to highlight it here:
The error wrapping support follows the initial proposal described https://go.googlesource.com/proposal/+/master/design/29934-error-values.md, it adds a new Wrapper() interface:
Also, to support wrapping,
Thanks for your attention 🙂
PPS Given the summer is gone, I’ll try to post more news and interesting things to the channel in the future 🙂
Feel free to check the updates by the link:
https://blog.golang.org/go1.13
In short, there is a list of major changes:
- The go command now downloads and authenticates modules using the Go module mirror and Go checksum database by default
- Improvements to number literals
- Error wrapping
- TLS 1.3 on by default
- Improved modules support
PS In my point of view, Error handling is one of the most important syntax changes, so I’d just want to highlight it here:
The error wrapping support follows the initial proposal described https://go.googlesource.com/proposal/+/master/design/29934-error-values.md, it adds a new Wrapper() interface:
An error that wraps another error should implement Wrapper by defining an Unwrap method.
type Wrapper interface {
// Unwrap returns the next error in the error chain.
// If there is no next error, Unwrap returns nil.
Unwrap() error
}
Also, to support wrapping,
fmt.Errorf now has a %w verb for creating wrapped errors, and three new functions in the errors package ( errors.Unwrap, errors.Is and errors.As ) simplify unwrapping and inspecting wrapped errors.Thanks for your attention 🙂
PPS Given the summer is gone, I’ll try to post more news and interesting things to the channel in the future 🙂
blog.golang.org
Go 1.13 is released - The Go Blog
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Quite interesting reading about versioning principles in Go and how the team came up with Go modules in the end: https://research.swtch.com/vgo-principles
>>> This blog post is about how we added package versioning to Go, in the form of Go modules, and the reasons we made the choices we did. It is adapted and updated from a talk I gave at GopherCon Singapore in 2018
>>> This blog post is about how we added package versioning to Go, in the form of Go modules, and the reasons we made the choices we did. It is adapted and updated from a talk I gave at GopherCon Singapore in 2018
YouTube
Opening keynote: Go with Versions - GopherConSG 2018
Speaker: Russ Cox
It’s time to add versioning to the Go toolchain, the Go ecosystem, and Go workflows. Go 1.11 will add opt-in support for package versions. This talk will explain the background, motivation, and rationale for the new version support and…
It’s time to add versioning to the Go toolchain, the Go ecosystem, and Go workflows. Go 1.11 will add opt-in support for package versions. This talk will explain the background, motivation, and rationale for the new version support and…
Serverless tech stack is becoming more and more popular, so, in case you never tried AWS Lambda functions together with Go 💙 I’d suggest you take a look at the article: this quite simple reading allows you to get the idea of the technology.
https://read.acloud.guru/serverless-golang-api-with-aws-lambda-34e442385a6a
https://read.acloud.guru/serverless-golang-api-with-aws-lambda-34e442385a6a
A Cloud Guru
Blog (Frontpage)
Stay up to date on what's happening in technology, industry insights, technical skills development and all things cloud learning, and cloud certifications.
Hello, there 👋
Today I’d like to share a really good project I’ve recently found on GitHub: *Awesome Go Storage*. You’re probably familiar with Awesome-Go project (https://github.com/avelino/awesome-go): curated list of awesome Go frameworks, libraries and software. The next repo has the same idea but more specific topic: storages and databases. I’d suggest to put it in your bookmarks 😉
========================
A curated list of awesome Go storage projects and libraries. Inspired by awesome-go repository.
========================
Table of contents:
- Storage Servers implemented in Go.
- Key-Value Store implemented in Go.
- File Systems implemented in Go.
- Databases implemented in Go (schema migration, tools, engines, query builders);
- DB drivers and libraries (SQL; NoSQL libraries for connecting and operating databases + search and Analytic Databases)
https://github.com/gostor/awesome-go-storage
Today I’d like to share a really good project I’ve recently found on GitHub: *Awesome Go Storage*. You’re probably familiar with Awesome-Go project (https://github.com/avelino/awesome-go): curated list of awesome Go frameworks, libraries and software. The next repo has the same idea but more specific topic: storages and databases. I’d suggest to put it in your bookmarks 😉
========================
A curated list of awesome Go storage projects and libraries. Inspired by awesome-go repository.
========================
Table of contents:
- Storage Servers implemented in Go.
- Key-Value Store implemented in Go.
- File Systems implemented in Go.
- Databases implemented in Go (schema migration, tools, engines, query builders);
- DB drivers and libraries (SQL; NoSQL libraries for connecting and operating databases + search and Analytic Databases)
https://github.com/gostor/awesome-go-storage
Hi, channel 👋
You probably know, how to deal with WebSockets in Go, don’t you?
But what if we need to handle millions of them? In the following well-written article an approach is described which could help us to handle up to 3 million online connections 😱
https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/
You probably know, how to deal with WebSockets in Go, don’t you?
But what if we need to handle millions of them? In the following well-written article an approach is described which could help us to handle up to 3 million online connections 😱
https://www.freecodecamp.org/news/million-websockets-and-go-cc58418460bb/
freeCodeCamp.org
A Million WebSockets and Go
By Sergey Kamardin Hi everyone! My name is Sergey Kamardin and I’m a developer at Mail.Ru. This article is about how we developed the high-load WebSocket server with Go. If you are familiar with WebSockets, but know little about Go, I hope you will s...
👍3❤1🔥1👏1
Happy New year for everyone 😀🎉 that's an interesting stuff I've found recently: how Grab deals with event sourcing and stream processing pipelines in Go. Worth to read especially the system design parts. Enjoy 🙌 https://engineering.grab.com/plumbing-at-scale
Grab Tech
Plumbing At Scale
This article details our journey building and deploying an event sourcing platform in Go, building a stream processing framework over it, and then scaling it (reliably and efficiently) to service over 300 billion events a week.
How much do you know about defers in Go?
https://rakyll.org/inlined-defers/
> An optimization in 1.14 and later for simple use cases with defer that removes most of the performance hit for deferred functions, complete with the how and the why.
https://rakyll.org/inlined-defers/
> An optimization in 1.14 and later for simple use cases with defer that removes most of the performance hit for deferred functions, complete with the how and the why.
An overview and first impressions of Go made by an advanced JS engineer
>> As an advanced JavaScript developer, The more I work with JavaScript the more I understand the advantages of a statically typed language.
JavaScript is fascinating but sometimes you want to try something else and broaden your horizon.
This article will be a brain dump of all I’ve learned so far about Google’s Go language (I will update it as I go, pun intended).
I assume you have installed the Go binaries on your computer.
https://itnext.io/googles-go-essentials-for-node-js-javascript-developers-6d71f08d2531
>> As an advanced JavaScript developer, The more I work with JavaScript the more I understand the advantages of a statically typed language.
JavaScript is fascinating but sometimes you want to try something else and broaden your horizon.
This article will be a brain dump of all I’ve learned so far about Google’s Go language (I will update it as I go, pun intended).
I assume you have installed the Go binaries on your computer.
https://itnext.io/googles-go-essentials-for-node-js-javascript-developers-6d71f08d2531
👋 In case you're still not using Go interfaces or you're curious how they could be applied, check this small post out:
https://medium.com/better-programming/a-real-world-example-of-go-interfaces-98e89b2ddb67
(Only 2 mins read)
https://medium.com/better-programming/a-real-world-example-of-go-interfaces-98e89b2ddb67
(Only 2 mins read)
Medium
A Real-World Example of Go Interfaces
How to implement Go interfaces and why they’re awesome
👋 A lot of people are using validator.Validate for struct fields validation in Go. But how about to write your own custom validation rules? Check this article out:
https://medium.com/swlh/custom-struct-field-tags-and-validation-in-golang-9a7aeedcdc5b
https://medium.com/swlh/custom-struct-field-tags-and-validation-in-golang-9a7aeedcdc5b
Medium
Custom struct field tags and validate in Golang
Structs in Golang represent one of the most common variable types and used practically everywhere, from dealing with configuration options…
https://youtu.be/0c-1KJwSMCw
What’s happened to Go since Go 1.12 and what’s coming up for Go 1.14? Francesc Campoy and Maartje Eyskens took 25 minutes at last week’s FOSDEM event to bring us all up to speed.
Slides are here if you're not up for the video 🙂
https://speakerdeck.com/campoy/the-state-of-go-2020
What’s happened to Go since Go 1.12 and what’s coming up for Go 1.14? Francesc Campoy and Maartje Eyskens took 25 minutes at last week’s FOSDEM event to bring us all up to speed.
Slides are here if you're not up for the video 🙂
https://speakerdeck.com/campoy/the-state-of-go-2020
YouTube
State of Go 2020: changes since Go 1.12
Slides: bit.ly/sog-fosdem20
Francesc Campoy (https://twitter.com/francesc) and Maartje Eyskens (https://twitter.com/MaartjeME) come back to FOSDEM to cover the most important changes to the community since the same talk in 2019.
We cover the most important…
Francesc Campoy (https://twitter.com/francesc) and Maartje Eyskens (https://twitter.com/MaartjeME) come back to FOSDEM to cover the most important changes to the community since the same talk in 2019.
We cover the most important…
Good day for everyone 👋 I kinda missed the news for a bit, but no worries, here we are: a new interesting post comes up recently from Go dev team, check it out:
A new Go API for Protocol Buffers
Joe Tsai, Damien Neil, and Herbie Ong
Introduction: We are pleased to announce the release of a major revision of the Go API for protocol buffers, Google's language-neutral data interchange format.
https://blog.golang.org/protobuf-apiv2
A new Go API for Protocol Buffers
Joe Tsai, Damien Neil, and Herbie Ong
Introduction: We are pleased to announce the release of a major revision of the Go API for protocol buffers, Google's language-neutral data interchange format.
https://blog.golang.org/protobuf-apiv2
go.dev
A new Go API for Protocol Buffers - The Go Programming Language
Announcing a major revision of the Go API for protocol buffers.