Size: a a a

2017 December 05
4gophers
Catalog of error handling patterns in Go  
https://t.co/0RBff5Ct3I

This post is a catalog of error handling patterns that I have collected while working with Go. I do not claim these are good or that you should use them. I report them here so as a reference source for debate if you find yourself debating error handling tactic with someone this list is a useful place that you can point to explain what you mean.

#golang #error
источник
4gophers
Using named return variables to capture panics in Go
https://www.calhoun.io/using-named-return-variables-to-capture-panics-in-go/

The goal is to just document and illustrate a situation where named return variables are necessary, so with that said let's just jump right in.

#golang #variables
источник
4gophers
casbin - An authorization library
https://github.com/casbin/casbin

casbin - An authorization library that supports access control models like ACL, RBAC, ABAC in Golang
источник
4gophers
A Tale of Two 'rand's : Go Advent Day 5  
https://t.co/hpl8nVEuLP

had always been a bit confused as to how the crypto/rand package and the math/rand package were related, or how they were expected to work (together).

#golang #gopheracademy
источник
2017 December 06
4gophers
Introducing modern `find` alternative  
https://t.co/PnhKLLw4kv

Minio Client (mc) is a modern alternative to Unix coreutils like ls, cat, cp, mirror, diff, find for filesystems and object storage. Recently Carter McClellan contributed Unix like findcommand for mc.

#golang #cli
источник
4gophers
Writing an Interactive Message Bot for Slack in Golang  
https://t.co/fEqiKjQzxj

At Mercari, we use Slack Bots to automate a lot of our tasks. For example, releases of our main API are automated with a bot, and over 10 releases per day occur on Slack across Mercari JP, US and UK.
#golang #bot #slack
источник
2017 December 08
4gophers
Moving from PHP to GO  
https://t.co/zHFdAk7Tmo
источник
4gophers
Custom API Context: Alternative To Middleware Framework  
https://t.co/LpB2Weu8GY

I think using external routing and mdidleware is a mistake that adds complexity without much benefit. Here is an example of building up a type safe request stack specific to a single app.
источник
4gophers
#190: Debugging A Go Runtime Bug
https://golangweekly.com/issues/190
источник
4gophers
5 Gotchas of Defer in Go — Part I  
https://t.co/wWvG1hPYZd

Protect yourself from basic defer gotchas.
#golang #gotchas
источник
4gophers
[Перевод] Отладка злого бага в рантайме Go
https://habrahabr.ru/post/344080/

Я большой поклонник Prometheus и Grafana. Поработав SRE в Google, я научился ценить хороший мониторинг и за прошедший год предпочитал пользоваться комбинацией этих инструментов.
#golang #runtime
источник
2017 December 10
4gophers
Deploying a Go App to Kubernetes in 30 Seconds:
https://t.co/24X662ASRa

I’ve been working on a simple web application written in Go, hosted in Google Cloud, using Google Kubernetes Engine. It turned to be such great experience, I couldn’t miss opportunity to share it. It took me less than an hour to setup things for the first time, reading documentation and trying to figure out how things work. But, once I finished, I could deploy new version of my application in just 30 seconds!

#golang #kubernetes
источник
2017 December 11
4gophers
[Перевод] Почему дизайн Go плох для умных программистов
https://habrahabr.ru/post/344356/

На протяжении последних месяцев я использую Go для имплементаций Proof of Concept (прим.пер.: код для проверки работоспособности идеи) в свободное время. Отчасти это было для изучения самого языка программирования. Программы сами по себе очень просты и не являются целью статьи, но сам опыт использования Go заслуживает того, чтобы сказать о нем пару слов. Go обещает быть (прим.пер.: статья написана в 2015) массовым языком для серьезного масштабируемого кода. Язык создан в Google, в котором активно им пользуются. Подведя черту, я искренне считаю, что дизайн языка Go плох для умных программистов.

#golang #habrahabr
источник
4gophers
источник
4gophers
HTTP File Upload and Download with Go #golang
https://t.co/dQgbFhHzqj

I recently finished writing my first serious web application in Go and there were a few things which stood out in regards to web development with Go. In the past, I developed web applications as a profession and as a hobby in a multitude of different languages and paradigms, so I have seen quite a few things in this area.
#golang #file #upload
источник
2017 December 12
4gophers
justforfunc #25: deeper program analysis with go/parser
https://www.youtube.com/watch?v=YRWCa84pykM

In the second episode of the program analysis series we use go/parser to find out what's the most common local variable name and the most common package variable name.
#golang #video #justforfunc
источник
4gophers
Gitql - SQL interface to Git repositories #sql #golang
https://t.co/FDMADZFES1

#golang #git
источник
2017 December 13
4gophers
Distributed locks with Consul and Golang #golang
https://t.co/eIqcnsqsIH

Distributed lock is a mechanism for controlling access to a shared resource in a mutually exclusive way while it is considered distributed because it coordinates processes running on a multiple servers.

#golang #consul #distributed
источник
4gophers
joy - A delightful Go to Javascript compiler
https://t.co/Gcr9EIizFz

Translate idiomatic Go into concise Javascript that works in every browser. Use Go's type system and world-class tooling to build large web applications with confidence.

#golang #compiler #javascript
источник
4gophers
beeep - Cross-platform library for sending desktop notifications and beeps
https://t.co/dE2byC7kSi

#golang
источник