
How-ToTools
Go Learning Notes - Part 5: Packages, Exported Functions & Variables, & Scope
via Dev.to BeginnersKervie Sazon
Today I learned how to organize Go programs using packages, which allows me to separate logic into reusable modules. I practiced exporting functions and variables so they can be accessed from other packages, like moving my input validation into a helper package. I also learned about the three levels of variable scope: local (inside functions), package (accessible within a package), and global/exported (accessible across packages).
Continue reading on Dev.to Beginners
Opens in a new tab
33 views




