Yes, note you’ll also see:
defer f.Close()
Instead of, defer func(){ _ = f.Close() }()
I think this is likely a code style difference due to working with a linter that alarms on discarded error returns, but I’m not sure. Both options have the same behavior, unless you reassign f (defer f.Close() will use the original value, defer func() ... will use the current value).