SlideShare a Scribd company logo
1 of 37
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Refactoring to modules
Why, How and Everything Else I Can Fit In 15
Minutes…
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
https://jfrog.com/shownotes
• Slides
• Video
• Links
• Comments / Ratings
• Raffle
Shownotes
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Who am I?
• Developer Advocate
• Passionate about Serverless,
Containers, and all things
Cloud
• I love dadjokes, cheesecake
and APIs
@LeonStigter
Leon Stigter, Developer Advocate
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Let’s travel back in time…
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
When did you start with Go?
• Pre 1.0 (2012)
• 1.2 (2013)
• 1.5 (2015)
• 1.8 (2017)
• 1.11 (2018)
Let’s turn to the audience for a poll…
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
As simon sinek would say, start with the why…
Why do we have
this problem?
Source: Go at Google https://www.infoq.com/presentations/Go-Google
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
As simon sinek would say, start with the why…
Why do we have
this problem?
Source: Go at Google https://www.infoq.com/presentations/Go-Google
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
One easy solution…?
Dependencies are sources!
Remote imports are in VCS
Dump everything into a single folder
Compile…
Profit!!
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
• Which dependencies I use?
• Which dependencies you
used?
• Which dependencies I should
use?
• Which code I’m editing right
now?
• WTF is going on?!
But… how do I know…
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Let’s go fix it!
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Let’s duplicate dependencies…
“Check your dependencies to your own VCS.”
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Vendoring – the worst kind of forking
“Copy all of the files at some version from one version
control repository and paste them into a different version
control repository”
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
• History, branch, and tag information
is lost
• Pulling updates is impossible
• It invites modification, divergence,
and bad fork
• It wastes space
• Good luck finding which version of
the code you forked
But what is wrong with vendoring?
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Build your own dependency manager…
“It’s not the role of the tooling provided by
the language to dictate how you manage
your code (...)”
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Let’s go fix it!
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
• Working in project directories
• Local cache for dependencies
• Version declarations
• Conflict resolution
Go dep – Proper dependency management?
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Enter the world of go modules…
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Who is using Go
modules?
Back to the audience again…
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Module
A module is a collection of
related Go packages that
are versioned together as a
single unit.
Let’s go over some definitions
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Sources
A module is a tree
(directory) of Go source
files with a go.mod file in
the root directory.
Let’s go over some definitions
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Version Control
Most often, a single version-
control repository
corresponds exactly to a
single module
Let’s go over some definitions
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
mkdir mymodule
cd mymodule
go mod init github.com/retgits/mymodule
Creating a module
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
• Import dependencies from Gopkg.lock
go mod init <module path>
• Remove unnecessary imports and add indirect imports
go mod tidy
• Delete the vendor folder
rm –rf vendor/
• Delete Gopkg files
rm Gopkg.*
Moving from DEP to modules
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
module github.com/retgits/mymodule
go 1.12
require (
github.com/naoina/go-stringutil v0.1.0
github.com/some/dependency v1.2.3
github.com/google/go-github/v25 v25.0.1
)
replace github.com/some/dependency github.com/retgits/dependency
versioning
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
module github.com/retgits/mymodule
go 1.12
require (
github.com/naoina/go-stringutil v0.1.0
github.com/some/dependency v1.2.3
github.com/google/go-github/v25 v25.0.1
)
replace github.com/some/dependency github.com/retgits/dependency
Replacing packages
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
module github.com/retgits/mymodule
go 1.12
require (
github.com/naoina/go-stringutil v0.1.0
github.com/some/dependency v1.2.3
github.com/google/go-github/v25 v25.0.1
)
replace github.com/some/dependency ../../Downloads/dependency
Works with local folders too!
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Before modules
go get github.com/project-flogo/cli
git clone https://github.com/project-flogo/cli
<build module locally>
With modules
go get github.com/project-flogo/cli
GET github.com/project-flogo/cli/@v/list
GET github.com/project-flogo/cli/@v/v1.0.0.mod
GET github.com/project-flogo/cli/@v/v1.0.0.zip
Go get my module!
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
The <module>@v<version> construct should be immutable
That means that
github.com/project-flogo/cli/@v/v1.0.0
Should forever be the same…
Modules are immutable
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
But are they really?
”Friends don’t let friends do git push -f”
- Aaron Schlesinger
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Using the goproxy variable
export GOPROXY=https://myawesomeproxy.com
go get github.com/project-flogo/cli
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Immutable and repeatable builds
The best way to guarantee issues is force push
Immutable dependencies
Who doesn’t remember left-pad with Node.js?
Lost Dependencies
Even build when GitHub is down!?
Internet Issues
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Keeping modules
Immediate access, not shared, can be wiped…
Local cache ($GOPATH/pkg/mod)
Fast access, requires infra, shared across devs
Organizational cache (private proxy)
Highly available, CDN, no infra, free
Public cache (public proxy)
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
• If you haven’t, start with Go modules:
GO111MODULE=on
• Start working outside of your $GOPATH
• Use a public proxy server for immutable Go modules (like
GoCenter.io)
• Think about running your own proxy server (like Project
Athens)
Final thoughts
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
• https://jfrog.com/shownotes
• @LeonStigter
• #GoLang
• https://gocenter.io
Twitter, ads, and Q&a
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
Thank you!
@LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved

More Related Content

Similar to Refactoring to Go modules: why and how

Trusting Your Ingredients - What Building Software And Cheesecake Have In Common
Trusting Your Ingredients - What Building Software And Cheesecake Have In CommonTrusting Your Ingredients - What Building Software And Cheesecake Have In Common
Trusting Your Ingredients - What Building Software And Cheesecake Have In CommonLeon Stigter
 
Update Strategies for the Edge, by Kat Cosgrove
Update Strategies for the Edge, by Kat CosgroveUpdate Strategies for the Edge, by Kat Cosgrove
Update Strategies for the Edge, by Kat CosgroveCloud Native Day Tel Aviv
 
Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018Tessa Mero
 
DeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a ChatbotDeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a ChatbotTessa Mero
 
Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...
Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...
Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...Leon Stigter
 
Open Source Licence to Kill in Software Development
Open Source Licence to Kill in Software DevelopmentOpen Source Licence to Kill in Software Development
Open Source Licence to Kill in Software DevelopmentJamie Coleman
 
Build and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsBuild and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsJeff Hull
 
Agile User Acceptance Testing - Incorporating UAT into Agile
Agile User Acceptance Testing - Incorporating UAT into AgileAgile User Acceptance Testing - Incorporating UAT into Agile
Agile User Acceptance Testing - Incorporating UAT into AgileXBOSoft
 
Filip Rakowski "Web Performance in modern JavaScript world"
Filip Rakowski "Web Performance in modern JavaScript world"Filip Rakowski "Web Performance in modern JavaScript world"
Filip Rakowski "Web Performance in modern JavaScript world"Fwdays
 
jsDay - Javascript as a programming language
jsDay - Javascript as a programming languagejsDay - Javascript as a programming language
jsDay - Javascript as a programming languageMarco Cedaro
 
Rapid PowerShell Function Development
Rapid PowerShell Function DevelopmentRapid PowerShell Function Development
Rapid PowerShell Function DevelopmentFrank Lesniak
 
Awesome application in 2014
Awesome application in 2014Awesome application in 2014
Awesome application in 2014Codemotion
 
Smau milano 2012 arena social media emanuele-bolognesi
Smau milano 2012   arena social media emanuele-bolognesiSmau milano 2012   arena social media emanuele-bolognesi
Smau milano 2012 arena social media emanuele-bolognesiSMAU
 
The Art of Deploying Artifacts to Production With Confidence
The Art of Deploying Artifacts to Production With ConfidenceThe Art of Deploying Artifacts to Production With Confidence
The Art of Deploying Artifacts to Production With ConfidenceLeon Stigter
 
Performance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsPerformance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsFilip Rakowski
 
Getting Started with Scripts #HeroConf London 2015
Getting Started with Scripts #HeroConf London 2015Getting Started with Scripts #HeroConf London 2015
Getting Started with Scripts #HeroConf London 2015Amy Bishop
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisAgileSparks
 
Application Development with Pharo
Application Development with PharoApplication Development with Pharo
Application Development with PharoESUG
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with ChefAdam Jacob
 
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023Pedro Vicente
 

Similar to Refactoring to Go modules: why and how (20)

Trusting Your Ingredients - What Building Software And Cheesecake Have In Common
Trusting Your Ingredients - What Building Software And Cheesecake Have In CommonTrusting Your Ingredients - What Building Software And Cheesecake Have In Common
Trusting Your Ingredients - What Building Software And Cheesecake Have In Common
 
Update Strategies for the Edge, by Kat Cosgrove
Update Strategies for the Edge, by Kat CosgroveUpdate Strategies for the Edge, by Kat Cosgrove
Update Strategies for the Edge, by Kat Cosgrove
 
Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018
 
DeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a ChatbotDeveloperWeek2018 - Let's Build a Chatbot
DeveloperWeek2018 - Let's Build a Chatbot
 
Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...
Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...
Persistence is futile (or is it?) - How to Manage, Version, and Promote Docke...
 
Open Source Licence to Kill in Software Development
Open Source Licence to Kill in Software DevelopmentOpen Source Licence to Kill in Software Development
Open Source Licence to Kill in Software Development
 
Build and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsBuild and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 Mins
 
Agile User Acceptance Testing - Incorporating UAT into Agile
Agile User Acceptance Testing - Incorporating UAT into AgileAgile User Acceptance Testing - Incorporating UAT into Agile
Agile User Acceptance Testing - Incorporating UAT into Agile
 
Filip Rakowski "Web Performance in modern JavaScript world"
Filip Rakowski "Web Performance in modern JavaScript world"Filip Rakowski "Web Performance in modern JavaScript world"
Filip Rakowski "Web Performance in modern JavaScript world"
 
jsDay - Javascript as a programming language
jsDay - Javascript as a programming languagejsDay - Javascript as a programming language
jsDay - Javascript as a programming language
 
Rapid PowerShell Function Development
Rapid PowerShell Function DevelopmentRapid PowerShell Function Development
Rapid PowerShell Function Development
 
Awesome application in 2014
Awesome application in 2014Awesome application in 2014
Awesome application in 2014
 
Smau milano 2012 arena social media emanuele-bolognesi
Smau milano 2012   arena social media emanuele-bolognesiSmau milano 2012   arena social media emanuele-bolognesi
Smau milano 2012 arena social media emanuele-bolognesi
 
The Art of Deploying Artifacts to Production With Confidence
The Art of Deploying Artifacts to Production With ConfidenceThe Art of Deploying Artifacts to Production With Confidence
The Art of Deploying Artifacts to Production With Confidence
 
Performance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern jsPerformance optimization of vue.js apps with modern js
Performance optimization of vue.js apps with modern js
 
Getting Started with Scripts #HeroConf London 2015
Getting Started with Scripts #HeroConf London 2015Getting Started with Scripts #HeroConf London 2015
Getting Started with Scripts #HeroConf London 2015
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
 
Application Development with Pharo
Application Development with PharoApplication Development with Pharo
Application Development with Pharo
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
A Multiplatform, Multi-Tenant Challenge - Droidcon Lisbon 2023
 

More from Leon Stigter

Thinking Stateful Serverless
Thinking Stateful ServerlessThinking Stateful Serverless
Thinking Stateful ServerlessLeon Stigter
 
Test driving event-driven apps on kubernetes with kind, tekton, and knative
Test driving event-driven apps on kubernetes with kind, tekton, and knativeTest driving event-driven apps on kubernetes with kind, tekton, and knative
Test driving event-driven apps on kubernetes with kind, tekton, and knativeLeon Stigter
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonLeon Stigter
 
Data Driven Decisions in DevOps
Data Driven Decisions in DevOpsData Driven Decisions in DevOps
Data Driven Decisions in DevOpsLeon Stigter
 
Every Talk Has To Be Unique @ DevRel Meetup
Every Talk Has To Be Unique @ DevRel Meetup Every Talk Has To Be Unique @ DevRel Meetup
Every Talk Has To Be Unique @ DevRel Meetup Leon Stigter
 
Continuous Verification in a Serverless World
Continuous Verification in a Serverless WorldContinuous Verification in a Serverless World
Continuous Verification in a Serverless WorldLeon Stigter
 
Continuous Verification in a Serverless World
Continuous Verification in a Serverless WorldContinuous Verification in a Serverless World
Continuous Verification in a Serverless WorldLeon Stigter
 
Trusting Your Ingredients @DevOpsDays Columbus 2019
Trusting Your Ingredients @DevOpsDays Columbus 2019Trusting Your Ingredients @DevOpsDays Columbus 2019
Trusting Your Ingredients @DevOpsDays Columbus 2019Leon Stigter
 
Data Driven DevOps
Data Driven DevOpsData Driven DevOps
Data Driven DevOpsLeon Stigter
 
DevOps Theory vs. Practice: A Song of Ice and Tire Fire
DevOps Theory vs. Practice: A Song of Ice and Tire FireDevOps Theory vs. Practice: A Song of Ice and Tire Fire
DevOps Theory vs. Practice: A Song of Ice and Tire FireLeon Stigter
 
Project Flogo: Serverless Integration, Powered by Flogo and Lambda
Project Flogo: Serverless Integration, Powered by Flogo and LambdaProject Flogo: Serverless Integration, Powered by Flogo and Lambda
Project Flogo: Serverless Integration, Powered by Flogo and LambdaLeon Stigter
 
Project Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseProject Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseLeon Stigter
 
The Road to a Cloud-First Enterprise
The Road to a Cloud-First EnterpriseThe Road to a Cloud-First Enterprise
The Road to a Cloud-First EnterpriseLeon Stigter
 
Building serverless apps with Go & SAM
Building serverless apps with Go & SAMBuilding serverless apps with Go & SAM
Building serverless apps with Go & SAMLeon Stigter
 

More from Leon Stigter (14)

Thinking Stateful Serverless
Thinking Stateful ServerlessThinking Stateful Serverless
Thinking Stateful Serverless
 
Test driving event-driven apps on kubernetes with kind, tekton, and knative
Test driving event-driven apps on kubernetes with kind, tekton, and knativeTest driving event-driven apps on kubernetes with kind, tekton, and knative
Test driving event-driven apps on kubernetes with kind, tekton, and knative
 
Building Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and TektonBuilding Event-Driven Workflows with Knative and Tekton
Building Event-Driven Workflows with Knative and Tekton
 
Data Driven Decisions in DevOps
Data Driven Decisions in DevOpsData Driven Decisions in DevOps
Data Driven Decisions in DevOps
 
Every Talk Has To Be Unique @ DevRel Meetup
Every Talk Has To Be Unique @ DevRel Meetup Every Talk Has To Be Unique @ DevRel Meetup
Every Talk Has To Be Unique @ DevRel Meetup
 
Continuous Verification in a Serverless World
Continuous Verification in a Serverless WorldContinuous Verification in a Serverless World
Continuous Verification in a Serverless World
 
Continuous Verification in a Serverless World
Continuous Verification in a Serverless WorldContinuous Verification in a Serverless World
Continuous Verification in a Serverless World
 
Trusting Your Ingredients @DevOpsDays Columbus 2019
Trusting Your Ingredients @DevOpsDays Columbus 2019Trusting Your Ingredients @DevOpsDays Columbus 2019
Trusting Your Ingredients @DevOpsDays Columbus 2019
 
Data Driven DevOps
Data Driven DevOpsData Driven DevOps
Data Driven DevOps
 
DevOps Theory vs. Practice: A Song of Ice and Tire Fire
DevOps Theory vs. Practice: A Song of Ice and Tire FireDevOps Theory vs. Practice: A Song of Ice and Tire Fire
DevOps Theory vs. Practice: A Song of Ice and Tire Fire
 
Project Flogo: Serverless Integration, Powered by Flogo and Lambda
Project Flogo: Serverless Integration, Powered by Flogo and LambdaProject Flogo: Serverless Integration, Powered by Flogo and Lambda
Project Flogo: Serverless Integration, Powered by Flogo and Lambda
 
Project Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the EnterpriseProject Flogo: An Event-Driven Stack for the Enterprise
Project Flogo: An Event-Driven Stack for the Enterprise
 
The Road to a Cloud-First Enterprise
The Road to a Cloud-First EnterpriseThe Road to a Cloud-First Enterprise
The Road to a Cloud-First Enterprise
 
Building serverless apps with Go & SAM
Building serverless apps with Go & SAMBuilding serverless apps with Go & SAM
Building serverless apps with Go & SAM
 

Recently uploaded

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
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
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...masabamasaba
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durbanmasabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburgmasabamasaba
 

Recently uploaded (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
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-...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 

Refactoring to Go modules: why and how

  • 1. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Refactoring to modules Why, How and Everything Else I Can Fit In 15 Minutes…
  • 2. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved https://jfrog.com/shownotes • Slides • Video • Links • Comments / Ratings • Raffle Shownotes @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 3. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Who am I? • Developer Advocate • Passionate about Serverless, Containers, and all things Cloud • I love dadjokes, cheesecake and APIs @LeonStigter Leon Stigter, Developer Advocate @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 4. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Let’s travel back in time… @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 5. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved When did you start with Go? • Pre 1.0 (2012) • 1.2 (2013) • 1.5 (2015) • 1.8 (2017) • 1.11 (2018) Let’s turn to the audience for a poll… @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 6. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved As simon sinek would say, start with the why… Why do we have this problem? Source: Go at Google https://www.infoq.com/presentations/Go-Google @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 7. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved As simon sinek would say, start with the why… Why do we have this problem? Source: Go at Google https://www.infoq.com/presentations/Go-Google @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 8. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved One easy solution…? Dependencies are sources! Remote imports are in VCS Dump everything into a single folder Compile… Profit!! @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 9. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved • Which dependencies I use? • Which dependencies you used? • Which dependencies I should use? • Which code I’m editing right now? • WTF is going on?! But… how do I know… @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 10. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Let’s go fix it!
  • 11. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Let’s duplicate dependencies… “Check your dependencies to your own VCS.” @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 12. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Vendoring – the worst kind of forking “Copy all of the files at some version from one version control repository and paste them into a different version control repository” @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 13. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved • History, branch, and tag information is lost • Pulling updates is impossible • It invites modification, divergence, and bad fork • It wastes space • Good luck finding which version of the code you forked But what is wrong with vendoring? @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 14. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Build your own dependency manager… “It’s not the role of the tooling provided by the language to dictate how you manage your code (...)” @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 15.
  • 16. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Let’s go fix it! @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 17.
  • 18. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved • Working in project directories • Local cache for dependencies • Version declarations • Conflict resolution Go dep – Proper dependency management? @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 19. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Enter the world of go modules…
  • 20. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Who is using Go modules? Back to the audience again… @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 21. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Module A module is a collection of related Go packages that are versioned together as a single unit. Let’s go over some definitions @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 22. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Sources A module is a tree (directory) of Go source files with a go.mod file in the root directory. Let’s go over some definitions @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 23. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Version Control Most often, a single version- control repository corresponds exactly to a single module Let’s go over some definitions @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 24. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved mkdir mymodule cd mymodule go mod init github.com/retgits/mymodule Creating a module @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 25. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved • Import dependencies from Gopkg.lock go mod init <module path> • Remove unnecessary imports and add indirect imports go mod tidy • Delete the vendor folder rm –rf vendor/ • Delete Gopkg files rm Gopkg.* Moving from DEP to modules @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 26. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved module github.com/retgits/mymodule go 1.12 require ( github.com/naoina/go-stringutil v0.1.0 github.com/some/dependency v1.2.3 github.com/google/go-github/v25 v25.0.1 ) replace github.com/some/dependency github.com/retgits/dependency versioning @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 27. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved module github.com/retgits/mymodule go 1.12 require ( github.com/naoina/go-stringutil v0.1.0 github.com/some/dependency v1.2.3 github.com/google/go-github/v25 v25.0.1 ) replace github.com/some/dependency github.com/retgits/dependency Replacing packages @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 28. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved module github.com/retgits/mymodule go 1.12 require ( github.com/naoina/go-stringutil v0.1.0 github.com/some/dependency v1.2.3 github.com/google/go-github/v25 v25.0.1 ) replace github.com/some/dependency ../../Downloads/dependency Works with local folders too! @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 29. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Before modules go get github.com/project-flogo/cli git clone https://github.com/project-flogo/cli <build module locally> With modules go get github.com/project-flogo/cli GET github.com/project-flogo/cli/@v/list GET github.com/project-flogo/cli/@v/v1.0.0.mod GET github.com/project-flogo/cli/@v/v1.0.0.zip Go get my module! @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 30. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved The <module>@v<version> construct should be immutable That means that github.com/project-flogo/cli/@v/v1.0.0 Should forever be the same… Modules are immutable @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 31. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved But are they really? ”Friends don’t let friends do git push -f” - Aaron Schlesinger @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 32. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Using the goproxy variable export GOPROXY=https://myawesomeproxy.com go get github.com/project-flogo/cli @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 33. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Immutable and repeatable builds The best way to guarantee issues is force push Immutable dependencies Who doesn’t remember left-pad with Node.js? Lost Dependencies Even build when GitHub is down!? Internet Issues @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 34. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Keeping modules Immediate access, not shared, can be wiped… Local cache ($GOPATH/pkg/mod) Fast access, requires infra, shared across devs Organizational cache (private proxy) Highly available, CDN, no infra, free Public cache (public proxy) @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 35. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved • If you haven’t, start with Go modules: GO111MODULE=on • Start working outside of your $GOPATH • Use a public proxy server for immutable Go modules (like GoCenter.io) • Think about running your own proxy server (like Project Athens) Final thoughts @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 36. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved • https://jfrog.com/shownotes • @LeonStigter • #GoLang • https://gocenter.io Twitter, ads, and Q&a @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved
  • 37. @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved Thank you! @LeonStigter | jfrog.com/shownotes | Copyright © 2019 JFrog. All Rights Reserved