docs: don't create docs file for empty packages
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
5537ab33de
commit
606398b69a
@ -327,12 +327,6 @@ func walkStdlib(ctx context.Context, output, format string) {
|
||||
return err
|
||||
}
|
||||
|
||||
f, err := os.Create(filepath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
pkg := fmt.Sprintf("dagger.io/%s", p)
|
||||
lg.Info().Str("package", pkg).Str("format", format).Msg("generating doc")
|
||||
val, err := loadCode(pkg)
|
||||
@ -344,6 +338,12 @@ func walkStdlib(ctx context.Context, output, format string) {
|
||||
return err
|
||||
}
|
||||
|
||||
f, err := os.Create(filepath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
PrintDoc(ctx, f, pkg, val, format)
|
||||
return nil
|
||||
})
|
||||
|
Reference in New Issue
Block a user