Try to use go functions wherever possible