False positive в двух действиях, или
В Go есть тикеты про vet check (сложно) и про исправление range (мифический Go 2).
paralleltest
linter ругается и на корректный, и на некорректный код: https://github.com/kunwardeep/paralleltest/issues/8#issuecomment-871118330В Go есть тикеты про vet check (сложно) и про исправление range (мифический Go 2).
GitHub
Range statement for test ... does not use range value in t.Run linter is not always correct · Issue #8 · kunwardeep/paralleltest
Following piece of code currently triggers the linter, even though it is a valid code. package main import ( "fmt" "testing" ) func TestFunctionRangeNotUsingRangeValueInTDotRun(...
Загадка:
—
Отгадка: https://github.com/golang/go/issues/27900
—
$ go list all | grep k8s.io/kubernetes
$ go list -m all | grep k8s.io/kubernetes
k8s.io/kubernetes v1.13.0
$ go mod why k8s.io/kubernetes
# k8s.io/kubernetes
(main module does not need package k8s.io/kubernetes)
—Отгадка: https://github.com/golang/go/issues/27900
Оказывается, спецификация протокола MongoDB распространяется под лицензией СС Attribution-NonCommercial-ShareAlike, прямо запрещающей коммерческое использование, включая создание коммерческих СУБД и DBaaS’ов. Недавно они написали об этом явно: https://news.ycombinator.com/item?id=27908107 Но, как оказалось, эта лицензия была всегда.
Интересно, неужели Amazon DocumentDB и Azure CosmosDB делали чистую комнату?
Интересно, неужели Amazon DocumentDB и Azure CosmosDB делали чистую комнату?
Расс Кокс написал свои мысли про “make major versions optional in import paths”: https://github.com/golang/go/issues/44550#issuecomment-885324886
Но в этом большом вдумчивом сообщении мне больше всего понравился щелчок по носу Питеру Бургону:
> I have personally had what I consider to be substantial exposure to an enormous amount of Go code, due to my position in the OSS ecosystem, as well as my consulting work. That exposure includes, importantly, a huge amount of code maintained in private repositories. I have no way of knowing, but I suspect the only person in the Go community who may have seen more Go code than I have is Bill Kennedy. With that context, I can state without hesitation that the need to include two major versions of the same dependency in one compilation unit is extraordinarily rare, and in those rare circumstances that it does arise, it is almost always due to pathological conditions in the dependency graph.
This claim about needing multiple major versions being “extremely rare” is easily contradicted. Kubernetes depends on multiple major versions of github.com/russross/blackfriday and of gopkg.in/yaml. Even Peter's own Go-kit depends on both go.etcd.io/etcd/client/v2 and go.etcd.io/etcd/client/v3.
Но в этом большом вдумчивом сообщении мне больше всего понравился щелчок по носу Питеру Бургону:
> I have personally had what I consider to be substantial exposure to an enormous amount of Go code, due to my position in the OSS ecosystem, as well as my consulting work. That exposure includes, importantly, a huge amount of code maintained in private repositories. I have no way of knowing, but I suspect the only person in the Go community who may have seen more Go code than I have is Bill Kennedy. With that context, I can state without hesitation that the need to include two major versions of the same dependency in one compilation unit is extraordinarily rare, and in those rare circumstances that it does arise, it is almost always due to pathological conditions in the dependency graph.
This claim about needing multiple major versions being “extremely rare” is easily contradicted. Kubernetes depends on multiple major versions of github.com/russross/blackfriday and of gopkg.in/yaml. Even Peter's own Go-kit depends on both go.etcd.io/etcd/client/v2 and go.etcd.io/etcd/client/v3.
GitHub
proposal: cmd/go: make major versions optional in import paths · Issue #44550 · golang/go
Semantic Import Versioning (SIV) is a novel idea for supporting multiple versions of a package within the same program. To my knowledge and experience, it's the first example of a strategy for ...
А давно у https://staticcheck.io такой весёлый подзаголовок на сайте?
EDIT: Он ещё и меняется.
EDIT: Он ещё и меняется.
rm -rf $GOPATH
– лучший.Совет всем гоферам: никогда, никогда не игнорируйте ошибки, даже такие невозможные, как запись в bytes.Buffer.Write или encoding.BinaryMarshaler.MarshalBinary для тривиального типа. По закону подлости этот код будет скопирован и изменён так, что вместо
Угадайте, откуда я это знаю.
bytes.Buffer
будет net.Conn
, вместо тривиального типа – сложный с type switch
и default: return errors.New("unhandled type")
, а обработка ошибок не добавится – ну работало ж до этого. И будете потом на другом конце сети и кодовой базы несколько часов источник проблемы искать.Угадайте, откуда я это знаю.
Forwarded from oleg_log (Oleg Kovalov)
brew никак не завезет 1.17 (https://github.com/Homebrew/homebrew-core/pull/83413) и если у вас тоже проблемы с ARM,то обновите
x/sys
https://github.com/hashicorp/consul/pull/10869Очередной понедельник, очередная драма. @oleg_log уже написал про Rust, а я напишу про PostgreSQL:
* https://www.postgresql.org/about/news/trademark-actions-against-the-postgresql-community-2302/
* https://postgresql.fund/blog/postgres-core-team-attacks-postgres-community/
* https://news.ycombinator.com/item?id=28512274
* https://www.postgresql.org/about/news/trademark-actions-against-the-postgresql-community-2302/
* https://postgresql.fund/blog/postgres-core-team-attacks-postgres-community/
* https://news.ycombinator.com/item?id=28512274
PostgreSQL News
Trademark Actions Against the PostgreSQL Community
The PostgreSQL Core Team and the PostgreSQL Community Association of Canada (PGCAC) wish to provide clarification on the ownership and …
Long Term Support версии Go не будет, наш LTS – Go 1.
GitHub
proposal: all: designate Go 1.16 as first Long Term Support version · Issue #47942 · golang/go
Now that #44505 is accepted, and go 1.16 will be the official bootstrap compiler for Go language, I 'd like to propose an idea that I mentioned already in that thread. In many large organiz...
Через 45 минут будем в тёплой компании рассуждать про современный Go: https://youtu.be/Vf5lwZLMlQY
YouTube
Современный Go
🤔 "Современный" — релевантно ли такое определение в отношении к Go, так ли много изменилось в языке и экосистеме за последнее время? Какие очертились области применения Go и каково будущее языка?
Встретились и обсудили.
⏳ Таймкоды:
00:00 Знакомство
01:54…
Встретились и обсудили.
⏳ Таймкоды:
00:00 Знакомство
01:54…
👍1
В обсуждении выше мы коснулись компании Tailscale и про их продвинутое использование Go на iOS. И тут они как-раз подогнали пост про свои оптимизации потребления памяти своего Network Extension.
Tailscale
Hey linker, can you spare a meg?
Tailscale on iOS runs as a special kind of app, a Network Extension. This lets us run in the background, so we can secure traffic from all of your applications, without them having to change anything. But with this power comes a memory straightjacket. Normal…
Вот почему надо всегда в примерах использовать либо свои домены, либо example.com/.org/.net.
GitHub
sync: ExampleWaitGroup includes an porn website url · Issue #48886 · golang/go
What version of Go are you using (go version)? $ go version go1.16.5 darwin/amd64 Does this issue reproduce with the latest release? What operating system and processor architecture are you using (...