Golang Dependency Management: Simple Package Upgrade using Go Commands

Khor Lee Yong
4 min readAug 11, 2020

Introduction

Go is a programming language which is developed by Google. It is an open source programming language that aims to simplify building simple, reliable, and efficient software. It is also being referred as Golang by many, since the website is golang.org instead of go.org (which was already taken by a private corporation since 1996).

Go’s mascot, Gopher designed by Renée French

This tutorial will show you how to manage/upgrade/downgrade dependencies in your existing Go project.

What is a package?

By definition, a package is a standard library that ships with Go. A Go module is one or more Go packages with one version and dependencies to other modules. Each module has a unique module path.

If you are familiar with popular programming languages such as Java, C# or javascript, chances are you should have grasped the concept of packages already. For those who are not, just see it as a dependency — where you can make use of the functions and build your software on top of it without writing a lot of code. Adding a dependency avoids repeating work already done: designing, writing, testing, debugging, and maintaining a specific unit of code. As such, making use of packages enables us to make use of functions that are not built in and thus allows…

--

--

Khor Lee Yong

Full Stack Developer, Certified Scrum Master, Tech Evangelist, Agile Practitioner 👩🏻‍💻