SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
GTG (Golang Taipei Gathering): 30
Introduction vgo
Evan Lin
Agenda
● Go vendoring and package management
● Introduce vgo
● vgo features
● vgo tutorial
How to write a Go application
1. We write code
2. We use other’s code
3. ow..
Reference: GopherCon 2017: Sam Boyer - The New Era of Go Package Management
Need other’s code?
`go get github.com/xxxx/xxx`
If you are lucky….
But...
Vendoring control ...
Rise of vendoring tools:
● 2013: godep, gom, et. all - 2013
● 2014: glide, gopkg, et. all - 2014
● 2015: gb, govendor, et. all - 2015
● 2017: dep (official experiment)
Reference: GopherCon 2017: Sam Boyer - The New Era of Go Package Management
About Vendoring in Go
● 2015: Go 1.5 vendor/ added, default off
● 2016: Go 1.6 vendor/ on by default
● 2017: Go 1.7 vendor/ always on
Reference: GopherCon 2017: Sam Boyer - The New Era of Go Package Management
what is vgo
● Proposed Modification to "go" Tool.
● Provide versioned concept to go tools
● Target to ship on go 1.11, will be offcial on go 1.12
● vgo has lots of features….
vgo Features
● The Import Compatibility Rule
● Semantic Import Versioning
● Minimal Version Selection
● Allow run go command outside GOPATH
● Default download code in `vgo build`
● ...
1. The Import Compatibility Rule
● 2017/06 github.com/kkdai/testGo
● 2017/08 github.com/kkdai/testGo
● 2017/12 github.com/kkdai/testGo.v2
Need backward-compatible
Breaking change
2. Semantic Import Versioning
3. Minimal Version Selection
Minimal version selection allows modules to
specify only minimum requirements for their
dependency modules.
When you want the update
your software?
● For security concern?
● Faster? Stronger?
Update your vendor code ..
Update your vendor code until you need it
Update your vendor code untill you *REALLY* need it
4. Allow run go command outside GOPATH
Allow running the go command in file trees outside GOPATH, provided there is
a go.mod in the current directory or a parent directory.
That go.mod file defines the mapping from file system to import path as well
as the specific module versions used in the build.
P.S.
● Go 1.10 set default GOPATH
● vgo (1.12?) run go command outside GOPATH
5. Default download without `go get`
● Original build process:
○ Write your own `main.go`
○ `go get` dependency module code
○ `go build`
● vgo build process:
○ Write your own `main.go`
○ `vgo build`
vgo tutorial
vgo can run go command outside GOPATH..
vgo tutorial (1):
● Install vgo
○ go get -u golang.org/x/vgo
● example code (download here)
vgo tutorial (2)
● Create go.mod
○ touch go.mod
● Build your code
vgo tutorial (3)
● Check go.mod
● Question: How to define your version?
○ It support branch and tag
■ https://github.com/bketelsen/captainhook/blob/master/go.mod#L5:2
■ https://github.com/gorilla/mux/releases/tag/v1.6.0
vgo tutorial (4)
● List all modules
vgo tutorial (5)
● List all availible version on rsc.io/quote (vgo list)
vgo tutorial (6) - Upgrade
● List all module and it latest version
vgo tutorial (7) - Upgrade
● Upgrade to latest module
vgo tutorial (8) - run test on latest module
● Try to test latest modules
vgo tutorial (9) - Downgrading
● Use `vgo get` to downgrading specific version
vgo tutorial (10) - Excluding
● Excluding specific version
1. Go & Versioning from Russ Cox
2. Youtube: Building Predictability into Your Pipeline ::
Russ Cox; Jess Frazelle, Sam Boyer, Pete Garcin
3. GopherCon 2017: Sam Boyer - The New Era of Go
Package Management
4. Using vgo for Go Dependency Management
5. Repeatable Builds with vgo
Reference:
Youtube: Building Predictability into Your Pipeline :: Russ
Cox; Jess Frazelle, Sam Boyer, Pete Garcin

Más contenido relacionado

Similar a GTG30: Introduction vgo

Modules - Go west 2018-10-02
Modules - Go west 2018-10-02Modules - Go west 2018-10-02
Modules - Go west 2018-10-02Max Ekman
 
Security of Go Modules - SF Meetup
Security of Go Modules - SF MeetupSecurity of Go Modules - SF Meetup
Security of Go Modules - SF MeetupDeep Datta
 
Understanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notesUnderstanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notesMitali Bisht
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talkTiago Ameller
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.WordCamp Harare
 
Security of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenterSecurity of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenterDeep Datta
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to GoSimon Hewitt
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golangSeongJae Park
 
Understanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for Modules
Understanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for ModulesUnderstanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for Modules
Understanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for ModulesMitali Bisht
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)Evan Lin
 
Understanding pseudoversion- GolangDC
Understanding pseudoversion- GolangDCUnderstanding pseudoversion- GolangDC
Understanding pseudoversion- GolangDCMitali Bisht
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using GolangSeongJae Park
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go langAmal Mohan N
 
How to Git and Github | Hands on workshop
How to Git and Github | Hands on workshopHow to Git and Github | Hands on workshop
How to Git and Github | Hands on workshopPavitraBhagat
 

Similar a GTG30: Introduction vgo (20)

Modules - Go west 2018-10-02
Modules - Go west 2018-10-02Modules - Go west 2018-10-02
Modules - Go west 2018-10-02
 
Security of Go Modules - SF Meetup
Security of Go Modules - SF MeetupSecurity of Go Modules - SF Meetup
Security of Go Modules - SF Meetup
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
 
Understanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notesUnderstanding pseudo-version and Go1.14+ with notes
Understanding pseudo-version and Go1.14+ with notes
 
Git for work groups ironhack talk
Git for work groups ironhack talkGit for work groups ironhack talk
Git for work groups ironhack talk
 
Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.Using Git with WordPress - Presented by Nigel Rodgers.
Using Git with WordPress - Presented by Nigel Rodgers.
 
Security of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenterSecurity of go modules and vulnerability scanning in GoCenter
Security of go modules and vulnerability scanning in GoCenter
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Mono Repo
Mono RepoMono Repo
Mono Repo
 
Git Basics
Git BasicsGit Basics
Git Basics
 
Develop Android/iOS app using golang
Develop Android/iOS app using golangDevelop Android/iOS app using golang
Develop Android/iOS app using golang
 
Understanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for Modules
Understanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for ModulesUnderstanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for Modules
Understanding Pseudo-Versions Moving to Go 1.13 What is in Go 1.14+ for Modules
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
 
Gerrit Code Review
Gerrit Code ReviewGerrit Code Review
Gerrit Code Review
 
Understanding pseudoversion- GolangDC
Understanding pseudoversion- GolangDCUnderstanding pseudoversion- GolangDC
Understanding pseudoversion- GolangDC
 
Intro. to Git and Github
Intro. to Git and GithubIntro. to Git and Github
Intro. to Git and Github
 
Untangling4
Untangling4Untangling4
Untangling4
 
Develop Android app using Golang
Develop Android app using GolangDevelop Android app using Golang
Develop Android app using Golang
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
How to Git and Github | Hands on workshop
How to Git and Github | Hands on workshopHow to Git and Github | Hands on workshop
How to Git and Github | Hands on workshop
 

Más de Evan Lin

好書分享: 一人公司 Company Of One
好書分享:  一人公司  Company Of One好書分享:  一人公司  Company Of One
好書分享: 一人公司 Company Of OneEvan Lin
 
How to master a programming language: a Golang example"
How to master a programming language: a Golang example"How to master a programming language: a Golang example"
How to master a programming language: a Golang example"Evan Lin
 
Golang taipei #45 10th birthday
Golang taipei #45 10th birthdayGolang taipei #45 10th birthday
Golang taipei #45 10th birthdayEvan Lin
 
How I become Go GDE
How I become Go GDEHow I become Go GDE
How I become Go GDEEvan Lin
 
iThome Modern Web 2018: 如何打造高效的機器學習平台
iThome Modern Web 2018: 如何打造高效的機器學習平台iThome Modern Web 2018: 如何打造高效的機器學習平台
iThome Modern Web 2018: 如何打造高效的機器學習平台Evan Lin
 
Kubernetes secret introduction
Kubernetes secret introductionKubernetes secret introduction
Kubernetes secret introductionEvan Lin
 
Consistent hashing algorithmic tradeoffs
Consistent hashing  algorithmic tradeoffsConsistent hashing  algorithmic tradeoffs
Consistent hashing algorithmic tradeoffsEvan Lin
 
Kubernetes v.s. mesos
Kubernetes v.s. mesosKubernetes v.s. mesos
Kubernetes v.s. mesosEvan Lin
 
iThome Cloud Summit: The next generation of data center: Machine Intelligent ...
iThome Cloud Summit: The next generation of data center: Machine Intelligent ...iThome Cloud Summit: The next generation of data center: Machine Intelligent ...
iThome Cloud Summit: The next generation of data center: Machine Intelligent ...Evan Lin
 
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人Evan Lin
 
Google APAC Machine Learning Expert Day
Google APAC Machine Learning Expert DayGoogle APAC Machine Learning Expert Day
Google APAC Machine Learning Expert DayEvan Lin
 
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line BotEvan Lin
 
Use go channel to write a disk queue
Use go channel to write a disk queueUse go channel to write a disk queue
Use go channel to write a disk queueEvan Lin
 
Gopher Taiwan Gathering #16: Build a smart bot via Golang
Gopher Taiwan Gathering #16:  Build a smart bot via GolangGopher Taiwan Gathering #16:  Build a smart bot via Golang
Gopher Taiwan Gathering #16: Build a smart bot via GolangEvan Lin
 
Docker swarm introduction
Docker swarm introductionDocker swarm introduction
Docker swarm introductionEvan Lin
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangEvan Lin
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot Evan Lin
 
Docker introduction in Hardware Company
Docker introduction in Hardware CompanyDocker introduction in Hardware Company
Docker introduction in Hardware CompanyEvan Lin
 
Host Line Bot with Golang
Host Line Bot with GolangHost Line Bot with Golang
Host Line Bot with GolangEvan Lin
 

Más de Evan Lin (20)

好書分享: 一人公司 Company Of One
好書分享:  一人公司  Company Of One好書分享:  一人公司  Company Of One
好書分享: 一人公司 Company Of One
 
How to master a programming language: a Golang example"
How to master a programming language: a Golang example"How to master a programming language: a Golang example"
How to master a programming language: a Golang example"
 
Golang taipei #45 10th birthday
Golang taipei #45 10th birthdayGolang taipei #45 10th birthday
Golang taipei #45 10th birthday
 
How I become Go GDE
How I become Go GDEHow I become Go GDE
How I become Go GDE
 
iThome Modern Web 2018: 如何打造高效的機器學習平台
iThome Modern Web 2018: 如何打造高效的機器學習平台iThome Modern Web 2018: 如何打造高效的機器學習平台
iThome Modern Web 2018: 如何打造高效的機器學習平台
 
Kubernetes secret introduction
Kubernetes secret introductionKubernetes secret introduction
Kubernetes secret introduction
 
Consistent hashing algorithmic tradeoffs
Consistent hashing  algorithmic tradeoffsConsistent hashing  algorithmic tradeoffs
Consistent hashing algorithmic tradeoffs
 
Kubernetes v.s. mesos
Kubernetes v.s. mesosKubernetes v.s. mesos
Kubernetes v.s. mesos
 
iThome Cloud Summit: The next generation of data center: Machine Intelligent ...
iThome Cloud Summit: The next generation of data center: Machine Intelligent ...iThome Cloud Summit: The next generation of data center: Machine Intelligent ...
iThome Cloud Summit: The next generation of data center: Machine Intelligent ...
 
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
iThome Chatbot Day: 透過 Golang 無痛建置機器學習聊天機器人
 
Google APAC Machine Learning Expert Day
Google APAC Machine Learning Expert DayGoogle APAC Machine Learning Expert Day
Google APAC Machine Learning Expert Day
 
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
 
Use go channel to write a disk queue
Use go channel to write a disk queueUse go channel to write a disk queue
Use go channel to write a disk queue
 
Gopher Taiwan Gathering #16: Build a smart bot via Golang
Gopher Taiwan Gathering #16:  Build a smart bot via GolangGopher Taiwan Gathering #16:  Build a smart bot via Golang
Gopher Taiwan Gathering #16: Build a smart bot via Golang
 
Docker swarm introduction
Docker swarm introductionDocker swarm introduction
Docker swarm introduction
 
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 GolangCOSCUP 2016: Project 52 每週一個小專案來學習 Golang
COSCUP 2016: Project 52 每週一個小專案來學習 Golang
 
Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot Modern Web 2016: Using Golang to build a smart IM Bot
Modern Web 2016: Using Golang to build a smart IM Bot
 
Docker introduction in Hardware Company
Docker introduction in Hardware CompanyDocker introduction in Hardware Company
Docker introduction in Hardware Company
 
Host Line Bot with Golang
Host Line Bot with GolangHost Line Bot with Golang
Host Line Bot with Golang
 
Project52
Project52Project52
Project52
 

Último

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Último (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

GTG30: Introduction vgo

  • 1. GTG (Golang Taipei Gathering): 30 Introduction vgo Evan Lin
  • 2. Agenda ● Go vendoring and package management ● Introduce vgo ● vgo features ● vgo tutorial
  • 3. How to write a Go application 1. We write code 2. We use other’s code 3. ow.. Reference: GopherCon 2017: Sam Boyer - The New Era of Go Package Management
  • 4. Need other’s code? `go get github.com/xxxx/xxx`
  • 5. If you are lucky….
  • 8. Rise of vendoring tools: ● 2013: godep, gom, et. all - 2013 ● 2014: glide, gopkg, et. all - 2014 ● 2015: gb, govendor, et. all - 2015 ● 2017: dep (official experiment) Reference: GopherCon 2017: Sam Boyer - The New Era of Go Package Management
  • 9. About Vendoring in Go ● 2015: Go 1.5 vendor/ added, default off ● 2016: Go 1.6 vendor/ on by default ● 2017: Go 1.7 vendor/ always on Reference: GopherCon 2017: Sam Boyer - The New Era of Go Package Management
  • 10. what is vgo ● Proposed Modification to "go" Tool. ● Provide versioned concept to go tools ● Target to ship on go 1.11, will be offcial on go 1.12 ● vgo has lots of features….
  • 11. vgo Features ● The Import Compatibility Rule ● Semantic Import Versioning ● Minimal Version Selection ● Allow run go command outside GOPATH ● Default download code in `vgo build` ● ...
  • 12. 1. The Import Compatibility Rule ● 2017/06 github.com/kkdai/testGo ● 2017/08 github.com/kkdai/testGo ● 2017/12 github.com/kkdai/testGo.v2 Need backward-compatible Breaking change
  • 13. 2. Semantic Import Versioning
  • 14. 3. Minimal Version Selection Minimal version selection allows modules to specify only minimum requirements for their dependency modules.
  • 15. When you want the update your software? ● For security concern? ● Faster? Stronger?
  • 17. Update your vendor code until you need it
  • 18. Update your vendor code untill you *REALLY* need it
  • 19. 4. Allow run go command outside GOPATH Allow running the go command in file trees outside GOPATH, provided there is a go.mod in the current directory or a parent directory. That go.mod file defines the mapping from file system to import path as well as the specific module versions used in the build. P.S. ● Go 1.10 set default GOPATH ● vgo (1.12?) run go command outside GOPATH
  • 20. 5. Default download without `go get` ● Original build process: ○ Write your own `main.go` ○ `go get` dependency module code ○ `go build` ● vgo build process: ○ Write your own `main.go` ○ `vgo build`
  • 22. vgo can run go command outside GOPATH..
  • 23. vgo tutorial (1): ● Install vgo ○ go get -u golang.org/x/vgo ● example code (download here)
  • 24. vgo tutorial (2) ● Create go.mod ○ touch go.mod ● Build your code
  • 25. vgo tutorial (3) ● Check go.mod ● Question: How to define your version? ○ It support branch and tag ■ https://github.com/bketelsen/captainhook/blob/master/go.mod#L5:2 ■ https://github.com/gorilla/mux/releases/tag/v1.6.0
  • 26. vgo tutorial (4) ● List all modules
  • 27. vgo tutorial (5) ● List all availible version on rsc.io/quote (vgo list)
  • 28. vgo tutorial (6) - Upgrade ● List all module and it latest version
  • 29. vgo tutorial (7) - Upgrade ● Upgrade to latest module
  • 30. vgo tutorial (8) - run test on latest module ● Try to test latest modules
  • 31. vgo tutorial (9) - Downgrading ● Use `vgo get` to downgrading specific version
  • 32. vgo tutorial (10) - Excluding ● Excluding specific version
  • 33. 1. Go & Versioning from Russ Cox 2. Youtube: Building Predictability into Your Pipeline :: Russ Cox; Jess Frazelle, Sam Boyer, Pete Garcin 3. GopherCon 2017: Sam Boyer - The New Era of Go Package Management 4. Using vgo for Go Dependency Management 5. Repeatable Builds with vgo Reference:
  • 34. Youtube: Building Predictability into Your Pipeline :: Russ Cox; Jess Frazelle, Sam Boyer, Pete Garcin