🇺🇦 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 4, 2020
February 5, 2020
February 7, 2020
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