Golang start and tips
-
Upload
aaron-king -
Category
Technology
-
view
71 -
download
2
Transcript of Golang start and tips
Golang getting started & give up
JAJA
Outline• Use gvm manage your golang version• Folder structure• Use glide manage your package• Vscode on golang• Use makefile
Use gvm manage your golang version• Easy to install any golang version• Easy to change golang version • Easy to change golang environment• Simple
Use gvm manage your golang version
https://github.com/moovweb/gvm
Use gvm manage your golang version
Use gvm manage your golang version
Folder structure
https://golang.org/doc/code.html#GOPATH
Folder structure
https://github.com/Masterminds/glide
Folder structure by YEOMAN
Default is for one main application
Folder structure by YEOMAN
Easy install & run testing
Folder structure by YEOMAN
Mutileple main application
Use glide manage your package
https://glide.readthedocs.io/en/latest/versions/
Use glide manage your packagehttps://glide.readthedocs.io/en/latest/glide.yaml/
Remove dependency detect ( add excludeDirs on glide.yaml)
https://glide.readthedocs.io/en/latest/glide.yaml/
Use glide manage your package
Vscode on golang
Vscode on golang
Why your folder structure is important gocode
godef
Refactoring…
Use makefile
Thank you