Go function to test whether a file exists
Instead of checking with an if statement if errStat is null and then returning false:


if errStat != nil {
    return false
}
return true



you can return a Boolean expression:

return errStat == nil