Hey People. This is Ankur the curator behind ImportGolang Newsletter. Going forward we will have the newsletter release every Thursday. The previous issues have been released sporadic and I am sorry about that. I started coding in golang in 2011 and have shipped two non trivial in production golang software. I would love to hear your feedback and opinion on the curation. Reply to the email with any article you would like to see in the newsletter, I will read it for sure. See you people every Thursday.
Turning your apps into a Docker image is a great way to distribute and deploy your applications. Here is a step by step guide by Travis Reeder on How to Dockerize your Go App.
Sunday September the 18th marks a month since the Go 1.8 cycle opened officially. I’m passionate about the performance of Go programs, and of the compiler itself. This post is a brief look at the state of play, roughly 1/2 way into the development cycle for Go 1.81. Note: these results are of course preliminary and represent only a point in time, not the performance of the final Go 1.8 release.
Alexandre Bourget is maintaining this guide of Go and Sublime integration. If you are a sublime user have a look and contribute/learn.
In essence, a channel is a shared, concurrency-safe queue. Its primary purpose is to pass data across concurrency boundaries (i.e. between goroutines). Another way to say that is: you can send or receive an instance of any type on a channel. I’m going to focus on sending that chan type over a channel. Curator's Note - Interesting design patterns can evolve if we pass chan type over channel.
Go is a great language for CS majors. This page presents some university courses that use Go.
The key concept in the fmt package is the format template. This is a string that contains the text you want to print plus some placeholders (called verbs) that tell fmt where to insert your variables. Note - This post is part of a series of walkthroughs to help you understand the standard library better. Check Ben's other medium post and follow him.
An interesting property of Go’s built in data structures is that read operations work even when they are nil! Not only that, but read operations on nil built in structures behave just as if they are non-nil but empty. This is different than other languages and allows some interesting properties of structures in Go. Here is a full playground link: https://play.golang.org/p/KZktHi9Ht7.
@pyros2097 created this minimalistic and easy approach to wrap all their existing errors. So that once they have an error in production environment they would get an email with stacktrace. To parse the error stack trace https://github.com/maruel/panicparse has been used along with contributions made by @pyros2097 https://github.com/maruel/panicparse/issues/8 . Curator's Note - I am looking to use this personally. Really helpful for everyday go programmer.
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand. All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
After running multiple Go meetups for years, I get asked a lot of the same questions over and over. I'm hoping that this document will assist in helping other Go enthusiasts run or start their own meetups. This guide can be applied to virtually any meetup, just replace Go with your topic of choice!
Have you taken (or taught) a university course that uses #golang? Let me know—I want to assemble better resources for you!. We have shared the wiki in this newsletter where the courses are listed. Sameer manages the Go programming language team at Google.
Go’s new sync.ErrGroup package significantly improves developer productivity with goroutines. Recently the Go team added a new package in the experimental repository called sync.ErrGroup. sync.ErrGroup extends sync.WaitGroup by adding error propagation and the ability to cancel an entire set of goroutines when an unrecoverable error occurs, or a timeout is reached.
Here comes a quick and free way to incorporate any C library into your project by leveraging the cgo mechanism of Golang.
Gorgonia is a library that helps facilitate machine learning in Go. Write and evaluate mathematical equations involving multidimensional arrays easily. If this sounds like Theano or TensorFlow, it's because the idea is quite similar. Specifically, the library is pretty low-level, like Theano, but has higher goals like Tensorflow.
- 627 Stars, 13 Fork
Borg was built out of the frustration of having to leave the terminal to search for bash commands. Its succinct output also makes it easier to glance over multiple snippets of code.
BuntDB is a low-level, in-memory, key/value store in pure Go. It persists to disk, is ACID compliant, and uses locking for multiple readers and a single writer. It supports custom indexes and geospatial data. It's ideal for projects that need a dependable database and favor speed over data size.
A sensible secret management toolkit (and Go library) for admins and programmers
- 309 Stars, 7 Fork
GJSON is a Go package the provides a very fast and simple way to get a value from a json document. The reason for this library it to give efficient json indexing for the BuntDB project.