First step with function calls in Go

Really horrible to do os.Exit() in a function call so this will need
to be cleaned up later on. Baby steps, baby steps...