🇺🇦 Go for two :)
1.17K subscribers
22 photos
3 files
188 links
Telegram channel about tricks and engineering practices in the Go programming language over a cup of coffee ☕️.

author: @a_soldatenko
personal blog: https://asoldatenko.org

#golang #go #kubernetes #debugging
Download Telegram
February 26, 2020
March 1, 2020
Note #63 A new Go API for Protocol Buffers

В официальном #golang блоге появилась статья про новый Go API для Protocol Buffers.

Рекомендую почитать! ->

https://blog.golang.org/a-new-go-api-for-protocol-buffers
March 2, 2020
April 12, 2020
April 16, 2020
April 20, 2020
Note #67 What's coming in Go 1.15

Daniel Martí aka @mvdan_ недавно выступал на онлайн конференции "Go Remote Fest" с докладом: "What's coming in Go 1.15"!

Слайды его доклада можно найти по ссылке [1] или

Top 5 изменений:
- slightly smaller binaries (0.2% но все же =)
- new linker (еще WIP но можно ужно читать/смотреть [2]
- embed tzdata with time/tzdata https://github.com/golang/go/issues/38017
- add testing.TB.TempDir https://github.com/golang/go/issues/35998
- add testing.T.Deadline https://github.com/golang/go/issues/28135

Links:
- [1] https://docs.google.com/presentation/d/1veyF0y6Ynr6AFzd9gXi4foaURlgbMxM-tmB4StDrdAM/edit#slide=id.g840eaeb4b4_0_99
- [2] https://docs.google.com/document/d/1D13QhciikbdLtaI67U6Ble5d_1nsI4befEd6_k1z91U/view
April 26, 2020
June 22, 2020
July 11, 2020
August 18, 2020
August 19, 2020
Note #72 TestMain in Go 1.15 testing package no longer calls os.Exit

tl;dr
- Go1.15 has been released
- Changed the implementation of the testing package so that TestMain no longer calls os.Exit
- It is realized by changing the implementation of testing.M and modifying the template of the main function generated by go test.

Found interesting article with great examples of changes between 1.14 and 1.15 -> https://qiita.com/hgsgtk/items/40e63150affed01f6573

TIP: right click translate into English.
August 20, 2020
TIL: that "fallthrough" ignors the next "case" condition.
This code will print "one" and "two".

package main

import (
"fmt"
)

func main() {
a := 10
switch {
case a < 20:
fmt.Println("one")
fallthrough
case a < 10:
fmt.Println("two")
}
}


source https://twitter.com/yoavgo/status/1315622694554140673

P.S. я уже когда-то писал об этом тут https://t.me/golang_for_two/53
October 12, 2020
December 17, 2020
Подъехали видео с последнего GopherCon 2020

https://www.youtube.com/playlist?list=PL2ntRZ1ySWBfUint2hCE1JRxRWChloasB

Пишите в комментариях какой больше всего доклад понравился?
December 22, 2020
My engineering axioms by Martin Rue:

1. Change is constant.
2. Your product is an asset, but code is a liability.
3. Duplication is less costly than premature abstraction.
4. Code should be easy to delete.
5. Existing code exerts a powerful influence.
6. Accidental complexity is one of the biggest risks.
7. Technical excellence can be shadowed by bad personal skills.
8. You are not your code. Be kind to the coder, not to the code.
9. Treat people who know less than you with respect and patience.
10. The only true authority stems from knowledge, not from position.
11. Teaching is a form of learning in disguise.
12. Lift the skills of people around you, not just yourself.
13. The longer you wait the more you'll know.
14. A good type system is worth its weight plus some.
15. The right team of people trumps everything else.
16. Stick to boring technology, unless there's a good reason not to.
17. Have the smallest team possible, but no smaller. Grow it carefully.
18. Rest.
19. Don't pick a solution until you've thought of at least one more.
20. Have opinions, but avoid expressing them in ways that cause other people to believe you won't change them.
21. It's OK to say "I don't know" or "I need to research that before I have an answer".
22. Writing throwaway code to explore a problem space is underrated.
23. Manage state carefully.
24. It's all about trade-offs.
25. A good design is one in which you can change your mind without changing too much code.

https://martinrue.com/my-engineering-axioms/
December 24, 2020