Golang Package: mocking HTTP traffic via gock

Опубликовано: 28 Февраль 2026
на канале: Mario Carrion
1,737
31

How to mock and test HTTP traffic in Go? Using h2non/gock

Github repo: https://github.com/MarioCarrion/video...
Blog post: https://mariocarrion.com/2021/03/09/g...

Playlist "Golang Tools and Packages":    • Golang/Go Tools and Packages  
Playlist "Building Microservices in Go/Golang":    • Building Microservices in Golang/Go  

00:00 - Start
00:13 - Introduction to OpenWeather
02:00 - Demo
11:40 - Conclusion

= Packages used

h2non/gock

Subscribe:    / @mariocarrion  

---

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 #testing #programming

--- Our affiliate links below

Shop our favorite products → https://www.amazon.com/shop/rubycarrion
Vlogging setup → https://rubycarrion.com/camerasforvlo...
Get a 30 day FREE trial of Epidemic Sound → https://www.epidemicsound.com/referra...
Try Amazon Prime 30-Day FREE trial → https://amzn.to/3s0el1R
I love getting Cash Back and think you will too! Join for free and get $20 when you spend $20 → https://www.rakuten.com/r/RUBYRA132?e...
Sign up to start using vidIQ to grow your YouTube channel for FREE → https://vidiq.com/rubycarrion

--- Our Vlog Channel

   / rubycarrion