SlideShare a Scribd company logo
Ramit Surana @ramitsurana /in/ramitsurana
Dependency management in
Golang
Agenda
About Me
History
Dependencies
The Problem
Golist to the rescue
Gopkg
Gopm
Godep
Glide
GB
About Me
Open Source Contributor
Gopher
ramitsurana@gmail.com
History
Started as Go a "systems language"
The turning point for the project
was the release of Go 1 in March
2012
This year Gophercon turns 3 years
old.
Dependencies
Some file that you are trying to install in
order to run another file.
Whenever a class A uses another class or
interface B, then A depends on B. In such a
situation the class A is called the
"dependant" and the class or interface B is
called the "dependency".
The Problem
Golist cmd comes to the Rescue
Go list uses –f to use flags
$ go list -f '{{ .Imports }}' github.com/xxx/yyy
$ go list -f '{{ .Deps }}' github.com/xxx/yyy
$ list -f '{{ join .Imports "n" }}' github.com/xxx/yyy
Gopkg
Built by Gustavo Niemeyer
Provides stable APIs for the Go
language
Uses yaml package for building
URL's
URL is cleaner and shorter
It redirects to the package
documentation at godoc.org when
opened with a browser
Gopkg
gopkg.in
Gom
Built by Yasuhiro Matsumoto.
Uses a Gomfile to create test
enviornment and groups for the
project
Could generate and use travis test
by generating a travis-yml file.
Gom
github.com/mattn/gom
Sample Gomfile
Gvt
Simple vendoring tool made for Go
native vendoring
Made by Filo Sottile
No need to manually chase, copy or
cleanup dependencies Gvt
github.com/FiloSottile/gvt
Gopm
Built by Jiahua Chen
Download packages by version,not
git,hg,etc.
It has a registry using which you can
fetch the package.
Gopm Registry
Godep
Most used tool for Managing
dependencies in Golang
Builds 2 directories vendor and
Exports all the dependencies to
JSON file Godep
github.com/tools/godep
Glide
It supports tools likegit,bzr,hg,svn etc.
Manage and install dependencies on-
demand
Dependencies for a project are listed in
a glide.yaml file
It creates a glide.lock file containing the
complete dependency tree pinned to
specific versions.
How to use glide ?
Installation
$ curl https://glide.sh/get | sh
Creating yaml file
$ glide create
Glide up
$ glide up
It creates the glide.lock file which locks the versions of the current state
version of dependencies
GB
Proof of concept (PoC) replacement
build tool
Basically project to help you start a
workflow for your project
Workspace for all the Go code that
is required to build your project.
No environment variables to set
Other Tools
Govendor
GPM (https://github.com/pote/gpm)
GVM (https://github.com/pote/gvp)
And many more ….
Got Questions ?
Thank You

More Related Content

PDF
13 practical tips for writing secure golang applications
PDF
Golang online course
PDF
Inroduction to golang
PPTX
Optimizing and Profiling Golang Rest Api
PDF
GoLang Introduction
PPTX
Wonders of Golang
PPT
Come With Golang
PDF
Golang for PHP programmers: A practical introduction
13 practical tips for writing secure golang applications
Golang online course
Inroduction to golang
Optimizing and Profiling Golang Rest Api
GoLang Introduction
Wonders of Golang
Come With Golang
Golang for PHP programmers: A practical introduction

What's hot (20)

PPTX
Golang - Overview of Go (golang) Language
PPTX
Write microservice in golang
PPTX
PPTX
Back end User Group / Golang Intro
PDF
Golang from Scala developer’s perspective
PPTX
Developing Cross Platform Applications with Golang
PPTX
Golang for OO Programmers
PDF
Docker introduction in Hardware Company
PPTX
drone continuous Integration
PDF
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
PDF
kikstart journey of Golang with Hello world - Gopherlabs
PDF
Microservices in Golang
PDF
Let the contribution begin (EST futures)
PDF
Coding with golang
PDF
Building Command Line Tools with Golang
PDF
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
PPTX
Golang start and tips
PDF
用 Go 語言實戰 Push Notification 服務
PDF
Introduction to GitHub Actions
PPTX
Gorush: A push notification server written in Go
Golang - Overview of Go (golang) Language
Write microservice in golang
Back end User Group / Golang Intro
Golang from Scala developer’s perspective
Developing Cross Platform Applications with Golang
Golang for OO Programmers
Docker introduction in Hardware Company
drone continuous Integration
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...
kikstart journey of Golang with Hello world - Gopherlabs
Microservices in Golang
Let the contribution begin (EST futures)
Coding with golang
Building Command Line Tools with Golang
[INNOVATUBE] Tech Talk #3: Golang - Takaaki Mizuno
Golang start and tips
用 Go 語言實戰 Push Notification 服務
Introduction to GitHub Actions
Gorush: A push notification server written in Go
Ad

Viewers also liked (20)

PPTX
CoreOS: The Inside and Outside of Linux Containers
PDF
Golang server design pattern
PDF
A microservice architecture based on golang
PDF
Import golang; struct microservice
PPTX
用 Docker 改善團隊合作模式
PDF
Functional go
PPSX
Golang getting started
PDF
Golang package management
PDF
Ian Huston - "Deploying your data driven web app on Cloud Foundry"
PDF
Towards Application Portability in Platform as a Service
PDF
Unified Cloud Application Management
PPTX
Buildpacks detect, compile, release
PDF
How we built Packet's bare metal cloud platform
PPTX
Simple, Scalable and Secure Networking for Data Centers with Project Calico
PPTX
Myfirst buildpack session_mgmt_20161201
PPTX
Everyday life with Cloud Foundry in a big organization (Cloud Foundry Days To...
PPTX
Container Networking Meetup March 31 2016
PPT
Google Go! language
PPTX
Cloud Foundry V2 | Intermediate Deep Dive
PPTX
Intro to Project Calico: a pure layer 3 approach to scale-out networking
CoreOS: The Inside and Outside of Linux Containers
Golang server design pattern
A microservice architecture based on golang
Import golang; struct microservice
用 Docker 改善團隊合作模式
Functional go
Golang getting started
Golang package management
Ian Huston - "Deploying your data driven web app on Cloud Foundry"
Towards Application Portability in Platform as a Service
Unified Cloud Application Management
Buildpacks detect, compile, release
How we built Packet's bare metal cloud platform
Simple, Scalable and Secure Networking for Data Centers with Project Calico
Myfirst buildpack session_mgmt_20161201
Everyday life with Cloud Foundry in a big organization (Cloud Foundry Days To...
Container Networking Meetup March 31 2016
Google Go! language
Cloud Foundry V2 | Intermediate Deep Dive
Intro to Project Calico: a pure layer 3 approach to scale-out networking
Ad

Similar to Dependency management in golang (20)

PDF
The usage and dependency resolving mechanism of go module
PDF
Why and what is go
PDF
Refactoring to GO modules
PDF
Introduction to Go
PPTX
Ready, set, go! An introduction to the Go programming language
PPTX
Lab1GoBasicswithgo_foundationofgolang.pptx
PDF
Advantages of golang development services & 10 most used go frameworks
PDF
Vendoring - Go west 2018-03-07
PDF
GTG30: Introduction vgo
PDF
Hire golang developers and make the shift to brighter business future (build ...
PDF
Golang
PPTX
The GO Language : From Beginners to Gophers
ODP
How We Bacame a 'Go' Company
PPTX
SemVer and microservices in go
PDF
Golang workshop
PDF
When, how & why use golang in 2021 go benefits & use cases
PDF
The State of Go - Andrew Gerrand
PDF
Features of go
PDF
Refactoring to Go modules: why and how
PDF
Getting Started with Go
The usage and dependency resolving mechanism of go module
Why and what is go
Refactoring to GO modules
Introduction to Go
Ready, set, go! An introduction to the Go programming language
Lab1GoBasicswithgo_foundationofgolang.pptx
Advantages of golang development services & 10 most used go frameworks
Vendoring - Go west 2018-03-07
GTG30: Introduction vgo
Hire golang developers and make the shift to brighter business future (build ...
Golang
The GO Language : From Beginners to Gophers
How We Bacame a 'Go' Company
SemVer and microservices in go
Golang workshop
When, how & why use golang in 2021 go benefits & use cases
The State of Go - Andrew Gerrand
Features of go
Refactoring to Go modules: why and how
Getting Started with Go

More from Ramit Surana (17)

PDF
Using Serverless Architectures to build and provision modern infrastructures​
PDF
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
PDF
Introducing Vault
PDF
Getting Started with Consul
PDF
Building Digital Transaction Systems in the new Banking World
PDF
Building Big Architectures XP Conference 2016
PPTX
Building Big Architectures
PDF
Achieving CI/CD with Kubernetes
PPTX
Docker for the new Era: Introducing Docker,its components and tools
PPTX
Hashicorp: Delivering the Tao of DevOps
PPTX
Introducing Docker Swarm - the orchestration tool by Docker
PPTX
A brief study on Kubernetes and its components
PPTX
Sysdig - Introducing a new definition of Monitoring
PPTX
Introducing Puppet - The faster speed of Automation
PPTX
Introducing Chef | An IT automation for speed and awesomeness
PPTX
Canister
PPT
Exploring Openstack Swift(Object Storage) and Swiftstack
Using Serverless Architectures to build and provision modern infrastructures​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
Introducing Vault
Getting Started with Consul
Building Digital Transaction Systems in the new Banking World
Building Big Architectures XP Conference 2016
Building Big Architectures
Achieving CI/CD with Kubernetes
Docker for the new Era: Introducing Docker,its components and tools
Hashicorp: Delivering the Tao of DevOps
Introducing Docker Swarm - the orchestration tool by Docker
A brief study on Kubernetes and its components
Sysdig - Introducing a new definition of Monitoring
Introducing Puppet - The faster speed of Automation
Introducing Chef | An IT automation for speed and awesomeness
Canister
Exploring Openstack Swift(Object Storage) and Swiftstack

Recently uploaded (20)

PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
history of c programming in notes for students .pptx
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Introduction to Artificial Intelligence
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
2025 Textile ERP Trends: SAP, Odoo & Oracle
Softaken Excel to vCard Converter Software.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
How to Migrate SBCGlobal Email to Yahoo Easily
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Upgrade and Innovation Strategies for SAP ERP Customers
history of c programming in notes for students .pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
L1 - Introduction to python Backend.pptx
Essential Infomation Tech presentation.pptx
Introduction to Artificial Intelligence
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
VVF-Customer-Presentation2025-Ver1.9.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Navsoft: AI-Powered Business Solutions & Custom Software Development

Dependency management in golang

  • 1. Ramit Surana @ramitsurana /in/ramitsurana Dependency management in Golang
  • 2. Agenda About Me History Dependencies The Problem Golist to the rescue Gopkg Gopm Godep Glide GB
  • 4. History Started as Go a "systems language" The turning point for the project was the release of Go 1 in March 2012 This year Gophercon turns 3 years old.
  • 5. Dependencies Some file that you are trying to install in order to run another file. Whenever a class A uses another class or interface B, then A depends on B. In such a situation the class A is called the "dependant" and the class or interface B is called the "dependency".
  • 7. Golist cmd comes to the Rescue Go list uses –f to use flags $ go list -f '{{ .Imports }}' github.com/xxx/yyy $ go list -f '{{ .Deps }}' github.com/xxx/yyy $ list -f '{{ join .Imports "n" }}' github.com/xxx/yyy
  • 8. Gopkg Built by Gustavo Niemeyer Provides stable APIs for the Go language Uses yaml package for building URL's URL is cleaner and shorter It redirects to the package documentation at godoc.org when opened with a browser Gopkg gopkg.in
  • 9. Gom Built by Yasuhiro Matsumoto. Uses a Gomfile to create test enviornment and groups for the project Could generate and use travis test by generating a travis-yml file. Gom github.com/mattn/gom
  • 11. Gvt Simple vendoring tool made for Go native vendoring Made by Filo Sottile No need to manually chase, copy or cleanup dependencies Gvt github.com/FiloSottile/gvt
  • 12. Gopm Built by Jiahua Chen Download packages by version,not git,hg,etc. It has a registry using which you can fetch the package.
  • 14. Godep Most used tool for Managing dependencies in Golang Builds 2 directories vendor and Exports all the dependencies to JSON file Godep github.com/tools/godep
  • 15. Glide It supports tools likegit,bzr,hg,svn etc. Manage and install dependencies on- demand Dependencies for a project are listed in a glide.yaml file It creates a glide.lock file containing the complete dependency tree pinned to specific versions.
  • 16. How to use glide ? Installation $ curl https://glide.sh/get | sh Creating yaml file $ glide create Glide up $ glide up It creates the glide.lock file which locks the versions of the current state version of dependencies
  • 17. GB Proof of concept (PoC) replacement build tool Basically project to help you start a workflow for your project Workspace for all the Go code that is required to build your project. No environment variables to set
  • 18. Other Tools Govendor GPM (https://github.com/pote/gpm) GVM (https://github.com/pote/gvp) And many more ….