Mitap: Quarantine, Go away

Hello everyone! May 30th will be the second online mitap on Go. The organizers are the guys from the Go Yola and Golang Kazan communities . Let’s figure out how to organize testing of microservices, which way to implement DI on Go is better, why the gopher is blue, and how to survive with auto-generated go-swagger code. 

You will find four concentrated reports from the developers of MTS, iSpring, Percona and Toggl, the Go quiz and a lot of live communication. Under the cut are abstracts of reports, a link to the video broadcast and interviews with speakers. Do not switch!


Live May 30 


We start on the iSpring Tech YouTube channel on May 30 at 16:00. This is saturday. Each report is a direct contact with the speakers: ask questions by voice, write to chat. After each speech, we open a meeting room in which you can discuss the topic in detail. Hot discussions and hot questions are welcome. 

At the end of the mitap - a quiz on which you can test your strength in knowledge of Go :)

Connect to the mitap β†’ The

complete mitap program β†’

4 hot reports on Go



Testing (micro) services - Alexey Palazhchenko, Percona


- Pros and cons of testing microservices;
- what to do with authentication and authorization;
- how not to drop tests prod.

Why did you choose this theme?


People chose it :) We held an open vote among the developers on a choice of topics. It was attended by 85 people. Most voted for testing.

What do you miss most on Go?


Enum'ov and full check of all values ​​or types in switch / case. Linters solve this problem only partially. Generic in a close second place - type switch for all basic types I write more often than I would like.

What would you say to Rob Pike when you met?


Why? I interviewed him :)


Dependency Injection and it's friends (in Go) - Anton Kucherov, Toggl


- what are DIP, IoC and DI;
- what problems are solved with the help of these concepts;
- A number of options for implementing DI in Go.

Why did you choose this topic?


Because for a very long time I have been worried about the question: β€œWhy does our code eventually turn into a mess and how to resist this”?

Tell us about your biggest jamb on Go


Once I refactored one legacy project. He actively used concurrency. There was no documentation or specification. In the process, I put out the Token variable in the HttpClient structure field. It seemed to me that this is a common microservice access token. It turned out - it was a token associated with the user. 
When the change hit production, some users received data from others. Urgently had to take part of the system for maintenance and quickly clean the database from leaked data. It is good that the data was not personal - it was impossible to associate them with specific people.

What would you say to Rob Pike when you met?


Hello, nice to meet you.


Clean architecture in automation ”- Sergey Shambir, iSpring


- automation as a process;
- how to apply the principles of pure architecture for her;
- iSpring experience in writing automation utilities on Go.

Tell something that is not included in the report, but perfectly illustrates the topic.


The code for many popular DevOps tools is written in Go. It does not always shine with purity. For example, in docker and kubernetes code there are many panic calls. Although aimless use of panic is considered bad practice in Go. 
I am sure that with a clean architecture opensource projects on Go would attract more contributors. It is much easier to improve a project that is not turned into a mess by dozens of global variables, closely related packages and monstrous functions in violation of the Single Responsibility principle.

Tell us about your biggest jamb on Go


Once, with colleagues, we wrote a backend for an article editor. It was at the Testing & Fixing stage, when the tester noticed - in the morning the data of all articles disappears. It turned out that another service sends a list of articles for deletion by cron every night. If there was nothing to delete, he sent an empty list. And in our service, an empty list meant "delete all articles." 

Since then, I advise everyone in any API methods for changing / deleting data to always require a flag indicating that all entries are affected. Or introduce a separate method that removes / modifies everything.

What would you say to Rob Pike when you met? 


I would ask why the gopher is blue.


Go-Swagger in productivity: ups and downs ”- Ilya Kaznacheev, MTS


- how go-swagger simplifies team development;
- How to speed up work on the boilerplate code;
- why the generated code forces you to dance to your tune and how to deal with it.

Why did you choose this topic?


In several companies I am faced with the use of go-swagger. And always this involves tricks and hacks. I want to share them with the community so that people don’t have to rebuild an already built bike.

Tell something that is not included in the report, but perfectly illustrates the topic.


Once I participated in a hackathon with a team. At the first stage, we made an application with a backend on Go and a frontend on iOS. As a result, almost two-thirds of all the time was occupied by the process of exchanging information on changes in the API and implementing the API on the backend. 
At the second stage, we also made an application on Go and iOS. This time I used swagger to describe the API and go-swagger to generate the server infrastructure for this API. It saved 6 hours. Thanks to this, I had finished the server part before and was able to sleep normally at night.

Your version, why is the gopher blue?


Sick in childhood :)

See you on May 30 live. And not to miss the start, subscribe to the YouTube Channel iSpring Tech, join Go Yola and Golang Kazan . Here we publish hot reports from mitaps.

PS And yet, why is the gopher blue? Write your version in the comments.

All Articles