type scanner … type sortedScanner … func newSortedScanner(osPathname string, scratchBuffer []byte) (*sortedScanner, error) { … } func (d *sortedScanner) Err() error { … } func (d *sortedScanner) Dirent() (*Dirent, error) { … } func (d *sortedScanner) Name() string { … } func (d *sortedScanner) Scan() bool { … }