This tutorial is now deprecated. Please click here for the updated version. Welcome to tutorial number 7 in Golang tutorial series. What are packages and why are they used? So far we have seen go programs which have only one file which has a main function with a couple of other functions. In real world scenarios this approach to writing all source code in a single file will not work. It becomes impossible to reuse and maintain code written this way.