In the file "os" in the package "os" there is such code:
type File struct { *file } type file struct { fd syscall.Handle name string dirinfo *dirInfo l sync.Mutex isConsole bool lastbits []byte readbuf []rune }
Questions on the first struct File:
- Why so written this strukt? (I would just be the second Struck in the plan and everything, why is the first one here?)
What keeps this struct? There is no field in it, for example:
f *file // а там написано просто *file
How to access a field through a file?
var x File fmt.Println(x.name) // ошибка