5 Tips for Writing Idiomatic Code in Golang – Part 1



5 Tips for Writing Idiomatic Code in Golang – Part 1

5 Tips for Writing Idiomatic Code in Golang - Part 1

In this episode I share with you 5 tips for writing idiomatic code in Go! Let’s get into it:

■ Use gofmt
■ Keep receiver names short
■ Name packages accordingly
■ Group imports by their origin
■ Use short names for variables with limited scope

== Relevant links

■ 5 Tips for Writing Idiomatic Code in Golang – Part 2: https://youtu.be/lfQ4qLcE3Bo
■ 5 Tips for Writing Idiomatic Code in Golang – Part 3: https://youtu.be/qCg-FIkcJZw
■ Learning Go/Golang : https://www.youtube.com/playlist?list=PL7yAAGMOat_F7bOImcjx4ZnCtfyNEqzCy
■ Example: https://github.com/MarioCarrion/videos/tree/f677912d9ee5fe8891bc2fffeb406d1db68a6a8a/2021/12/21

== All Go/Golang Playlists

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

== Socials

■ https://twitter.com/MarioCarrion
■ https://www.instagram.com/mario.carrion
■ https://linkedin.com/in/MarioCarrion

00:00 – Start
00:10 – Idiomatic Golang Tip 1: Use gofmt
02:17 – Idiomatic Golang Tip 2: Keep receiver names short
04:52 – Idiomatic Golang Tip 3: Name packages accordingly
07:22 – Idiomatic Golang Tip 4: Group imports by their origin
09:11 – Idiomatic Golang Tip 5: Use short names for variables with limited Scope

=== 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 #tutorial #idiomatic

=== Our Vlog Channel

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

=== Affiliate links

■ Amazon Shop 🛒 https://www.amazon.com/shop/rubycarrion
■ Technical/Non-technical Books – Recommended by Mario Carrion 📚 https://www.amazon.com/shop/rubycarrion?listId=P8KAGIWTNH3X&ref=cm_sw_em_r_inf_list_own_rubycarrion_dp_dyqYP6yk67Hif

DISCLAIMER: Some of the links shared above are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost to you. Thank you in advance for your support!