Skip to content

Commit 7b2c489

Browse files
committed
feat(code): format
1 parent 4f84da4 commit 7b2c489

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

internal/format/formatgo/run.go

+4
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ func Run() error {
1919

2020
files = filterFiles(files)
2121

22+
return FormatFiles(files)
23+
}
24+
25+
func FormatFiles(files []string) error {
2226
gf := gofmtapi.NewFormatter()
2327
opt := gofmtapi.NewOptions()
2428
opt.BindFlags()

internal/gen/genapi/patch_handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (ja *JzeroApi) patchHandler(file HandlerFile) error {
101101
}
102102

103103
buf := bytes.NewBuffer(nil)
104-
if err := goformat.Node(buf, fset, f); err != nil {
104+
if err = goformat.Node(buf, fset, f); err != nil {
105105
return err
106106
}
107107

internal/serverless/serverlessbuild/run.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"path/filepath"
77
"strings"
88

9-
"github.com/jzero-io/jzero-contrib/modx"
109
"github.com/jzero-io/jzero-contrib/templatex"
1110
"github.com/pkg/errors"
1211
"github.com/rinchsan/gosimports"
@@ -69,7 +68,7 @@ func Run() error {
6968
return err
7069
}
7170
for i := 0; i < len(plugins); i++ {
72-
pluginGoMod, err := modx.GetGoMod(filepath.Join(wd, plugins[i].Path))
71+
pluginGoMod, err := mod.GetGoMod(filepath.Join(wd, plugins[i].Path))
7372
if err != nil {
7473
return err
7574
}

0 commit comments

Comments
 (0)