Import Function form package
I thought it was going to be similar to many languages and I will just have to just do something like:
Well… no, first it will depend on your GOPATH, which is handled differently depending of your go version. Secondly, In golang exported function must be in Uppercase, otherwise it won’t compile!
So I chose the easiest that I could find first to structure project by creating a module.
Create a go module:
go mod init github.com/emirot/go-guitar
It will create a
go.mod file like so:
module github.com/emirot/go-guitar go 1.16
And then I could finally do