DEV Community

Discussion on: My Journey into Go

Collapse
 
matteojoliveau profile image
Matteo Joliveau

It is more idiomatic in Go to have the package name act as the domain/namespace indicator.
I noticed your functions all begin with "auth". It would be correct to put auth_service.go in a package called auth, so your functions actually become auth.CheckPassword(), auth.Login() etc. (Notice the capital letter on the function names. In Go, a function with a capital is public, otherwise it is package-private).