Skip to content

Commit 050f400

Browse files
authored
fix(internal/librariangen): run goimports on the output root (#13248)
1 parent fe50105 commit 050f400

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/librariangen/postprocessor/postprocessor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ var (
3737
//
3838
// 1. Modify the generated snippets to specify the current version
3939
// 2. Run `goimports` to format the code.
40+
// 3. For new modules only, run "go mod init" and "go mod tidy"
4041
func PostProcess(ctx context.Context, req *request.Library, outputDir, moduleDir string, moduleConfig *config.ModuleConfig) error {
4142
slog.Debug("librariangen: starting post-processing", "directory", moduleDir)
4243

@@ -53,7 +54,7 @@ func PostProcess(ctx context.Context, req *request.Library, outputDir, moduleDir
5354
return fmt.Errorf("librariangen: failed to update snippets metadata: %w", err)
5455
}
5556

56-
if err := goimports(ctx, moduleDir); err != nil {
57+
if err := goimports(ctx, outputDir); err != nil {
5758
return fmt.Errorf("librariangen: failed to run 'goimports': %w", err)
5859
}
5960

0 commit comments

Comments
 (0)