No, they're not. The idiomatic usage is to defer a Close() call after checking that Open succeeded, like so:
file, err := os.Open("/etc/hostname")
if err != nil {
doSomethingWith(err)
}
defer file.Close()
doSomethingWith(file)
But you'd be forgiven for not knowing that: To my own surprise, I could not find the need for this idiom explained in the package documentation for os.Open, though you can see it in action throughout the std implementation. For example: https://cs.opensource.google/go/go/+/refs/tags/go1.20.4:src/...