Learning Golang: Versioning Tools as Dependencies using Go Modules



Learning Golang: Versioning Tools as Dependencies using Go Modules

Learning Golang: Versioning Tools as Dependencies using Go Modules

How can we add tools written in Go to our dependencies? How can I track tool dependencies for a module? How can we manage tools using Go Modules? With the idea of versioning them, as well as to make sure we have all their dependencies as part of our repository, and let’s not forget we can also add dependabot to make sure those are updated when the versions are released.

Welcome to another Learning Go video! In this episode I’m sharing with you how you how to add Go/Golang tools as dependencies into your project using the “Tools as Dependencies” paradigm which was unofficially introduced when Go Modules were added to the toolchain.

RELEVANT LINKS

* Example code: https://github.com/MarioCarrion/todo-api-microservice-example/tree/e44dc3d4016b80b8102eb1214fea452aebdd2667

* Tools as Dependencies Paradigm: https://github.com/go-modules-by-example/index/blob/master/010_tools/README.md
* “direnv” is an extension for your shell. It augments existing shells with a new feature that can load and unload environment variables depending on the current directory: https://direnv.net/

* Playlist “Learning Go/Golang”: https://www.youtube.com/playlist?list=PL7yAAGMOat_F7bOImcjx4ZnCtfyNEqzCy
* Playlist “Software Architecture in Go”: https://www.youtube.com/playlist?list=PL7yAAGMOat_GCd12Lrv_evJ3Zhv1dl8B-
* Playlist “Learning Go/Golang Concurrency Patterns” https://www.youtube.com/playlist?list=PL7yAAGMOat_Fhj_px_DzNzTsXs-mRwv1t
* Playlist “Building Microservices in Go”: https://www.youtube.com/playlist?list=PL7yAAGMOat_Fn8sAXIk0WyBfK_sT1pohu
* Playlist “Go/Golang Tools and Packages”: https://www.youtube.com/playlist?list=PL7yAAGMOat_HEEOvH99agDs_5g51A0Ls3
* Playlist “Testing in Go/Golang”: https://www.youtube.com/playlist?list=PL7yAAGMOat_HSeW4zF0uRL9EaHadE4ZZq

00:00 – Start
00:10 – Using direnv as a sandbox Go/Golang tool
02:35 – Defining Go/Golang tools as dependencies
05:22 – Using dependabot for Go/Golang tool dependencies
06:03 – Adding a new Go/Golang tool dependency
09:22 – Go/Golang Tools as Dependencies Conclusion

Who am I:

HelloπŸ‘‹πŸΌ! I’m Mario, a Hands-on Software Architect and Lead Backend Engineer with more than 16 years of professional experience building all kinds of software including on-premise Industrial Automation Systems, Linux Accessibility Desktop and Browser Components as well as Distributed Advertising Microservices.

Every week I will share with you different topics I’ve learned while working for small startups and large companies including the processes I’ve followed over the years for successfully delivering complex enterprise systems from start to end.

Subscribe if you like Software Development, Software Architecture and Systems Design!

Keep it up. Don’t give up!

#golang #microservices #programming

— Our affiliate links below

Shop our Amazon favorites β†’ https://www.amazon.com/shop/rubycarrion
Shop my IG feed on my LIKEtoKNOWit (LTK) page β†’ https://www.liketoknow.it/RubyCarrion
Shop Top Deals and Featured Offers at Best Buy β†’ https://bestbuy.7tiv.net/c/2558226/687081/10014
Get a 30 day FREE Trial of Epidemic Sound β†’ https://www.epidemicsound.com/referral/szx441/
Try Amazon Prime 30-day FREE Trial β†’ https://amzn.to/3yf9a0f
I love getting Cash Back and think you will too! Join for FREE and get $30 when you spend $30 β†’ https://www.rakuten.com/r/RUBYRA132?eeid=28187

— Our Vlog Channel

https://www.youtube.com/c/RubyCarrion/videos

Comments are closed.