I'm reading a tutorial on using Bazil/Fuse to make a file system using Go.
In the tutorial, I see the following as an example (specifically to get the Root of the file system):
var _ fs.FS = (*FS)(nil)
func (f *FS) Root() (fs.Node, fuse.Error) {
n := &Dir{
archive: f.archive,
}
return n, nil
}
The specific line I'm not understanding is the first one. What is that actually doing? I believe if I don't include that line, I can make the signature for this method whatever I want - if I do include it, I have to match their specific signature to override.
Can someone explain exactly what this line does, and when I would want to use it?