func openFile(name string, flag int, perm fs.FileMode) (*os.File, error) { … } func closeFile(f *os.File) error { … }