Skip to content

Commit

Permalink
fix(serverless): fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronnie committed Dec 11, 2024
1 parent 8455cac commit 7afac7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/serverless/serverlessbuild/run.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package serverlessbuild

import (
"github.com/rinchsan/gosimports"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -73,7 +74,8 @@ func Run() error {
if err != nil {
return err
}
if err := os.WriteFile(filepath.Join("plugins", "plugins.go"), pluginsGoBytes, 0o644); err != nil {
pluginsGoFormatBytes, err := gosimports.Process("", pluginsGoBytes, &gosimports.Options{Comments: true})
if err := os.WriteFile(filepath.Join("plugins", "plugins.go"), pluginsGoFormatBytes, 0o644); err != nil {
return err
}
return nil
Expand Down

0 comments on commit 7afac7b

Please sign in to comment.