Use the `IsDir` method from the [`os.FileInfo`](http://golang.org/pkg/os/#FileInfo) that is passed in.