3 ms·
> A function of this type is naturally going to return a file every time because a file is always useful, even when there is failure. You might want to look at
by masklinn 3y ago
> A function of this type is naturally going to return a file every time because a file is always useful, even when there is failure.
You might want to look at what Go does with zero-valued File. At best it ignores them and returns an error, at worst it panics.
There is no situation where a zero-valued file is useful.