Habr, bonjour! Nous avons publié GoLand 2020.2 il y a deux semaines et aimerions vous parler des principaux changements de cette version.
En bref, nous avons amélioré la prise en charge des modules Go, facilité la recherche des problÚmes et faiblesses possibles dans le code, ajouté de nouvelles vérifications de code.
, , , Go Playground, , WSL 2 Git Windows, !
, IDE. What's New in GoLand 2020.2 .
Go modules
Go 1.15 $GOPATH/pkg/mod
, GOMODCACHE.
GOMODCACHE Preferences/Settings | Go Modules | Environment. IDE .
go.mod Comment With Line Comment (Ctrl+/ Windows/Linux â/ macOS).
IDE Navigate to Declaration or Usages (âB macOS Ctrl+B/ Windows/Linux).
Inspections Widget , . Next Error (F2).
( , ), Compact View, .
Problems Alt+Enter.
Problems, Inspections Widget View | Tool Window | Problems. , .
string(int)
, UTF-8 Unicode x
x
.
GoLand .
GoLand â go vet. IDE (quick-fix). , GoLand Testme TestMe.
Malformed struct tag , , .
Impossible interface type assertion v.(T), switch, , V v , T. , V T , .
, Show Context Actions Alt+Enter, â„+Space macOS Ctrl+Shift+I Windows Linux.
Add Caret Per Selected Line . Alt+Shift+G Windows/Linux â„â§G macOS.
, Preferences/Settings | Editor | Code Style | Go | Wrapping and Braces.
Put arguments on separate lines Put arguments on one line Alt+Enter, .
Introduce Variable (Ctrl+Alt+V Windows Linux, ââ„ V macOS) , Inline Variable (â„âN macOS Ctrl+Alt+N Linux Windows), , .
Unpack slice .
, . Tools | Save Project as Template. IDE , .
Go Playground
Go Playground, . Go Tools | Share in Playground Tools | Go Tools | Share in Playground, â„â§âS macOS Ctrl+Alt+Shift+S Windows/Linux.
Playground go2
-, GoLand https://go2goplay.golang.org/.
GoLand 2020.2 . Enable experimental support for generics a.k.a type parameters Settings/Preferences | Go.
go2-.
IDE
Vendoring mode , , , vendor .
, Vendor Enable vendoring mode automatically Settings/Preferences | Go | Go Modules, GoLand vendor .
GoLand 2020.2 go list
.
WSL 2 Git Windows
GoLand 2020.2 Git WSL 2, Windows 10, 2004. Git Windows, GoLand Git WSL . IDE Git WSL , WSL ( \wsl$ path
).
Git
Merge, Pull Rebase Git, . , . ârebase Pull âno-verify Merge.
- GitHub
- GitHub. , -, , , , GoLand.
Compare branches
, GoLand, . IDE VCS, .
, IntelliJ IDEA Ultimate, GoLand , Go.
!