Adding Business Logic to the App
Add business logic to the app and learn to call functions that belong to a package.
We'll cover the following
So far, we have some code in our project in a package called coffee
. But how can we execute it? Like most languages, the execution point of entry in Go is the main
function (except when we use init
as the execution of entry).
Adding the main
function
Let's add a main.go
function.
Get hands-on with 1200+ tech skills courses.