Handle empty directories more gracefully

This commit is contained in:
Diego Fernando Carrión
2019-07-16 12:47:35 +02:00
parent 38700c8583
commit d3f916aac7

View File

@ -383,7 +383,8 @@ func genDocs() error {
},
// Define callback to run after processing all children for a directory.
PostChildrenCallback: func(path string, de *walk.Dirent) error {
if !(pkgs[path].isGoPkg) {
// Skip packages that don't contain go files or sub packages.
if !(pkgs[path].isGoPkg) && len(pkgs[path].subPkgs.ToSlice()) == 0 {
return nil
}
verboseLogf("Generating Documentation for %s", path)