5 ms·
But "outdated code" isn't inherently bad, is it? v1 code is still supported by the stdlib and it still does its job, at least until Go 2.x drops.
by Chiron1991 1y ago
But "outdated code" isn't inherently bad, is it? v1 code is still supported by the stdlib and it still does its job, at least until Go 2.x drops.
- ayuhito 1y agoIn fact, v1 code usually uses v2 code under the hood, but with different options to maintain backwards compatibility. You still get performance improvements even if you don’t switch over to the new import!
- Grokify 1y agoA good example is io/ioutil. It's useful to migrate to eliminate the deprecation messages, but you don't need to do it right away.
- majewsky 1y agoAlso, most of this can be automated with `go install golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest && modernize -fix ./...`