Skip to content

Commit 33d3d87

Browse files
committed
fix gen
1 parent ef2a5ca commit 33d3d87

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

cli/deployment/config.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/deploymentconfig/main.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ func GenerateData(ctx context.Context, dir string) (*Data, error) {
5454
return nil, xerrors.Errorf("parse package %q: %w", dir, err)
5555
}
5656

57-
codeBlocks, err := generateAll(pkg)
57+
data, err := generateAll(pkg)
5858
if err != nil {
5959
return nil, xerrors.Errorf("parse package %q: %w", dir, err)
6060
}
6161

62-
return codeBlocks, nil
62+
return data, nil
6363
}
6464

6565
// parsePackage takes a list of patterns such as a directory, and parses them.
@@ -88,7 +88,9 @@ func parsePackage(ctx context.Context, patterns ...string) (*packages.Package, e
8888
}
8989

9090
func generateAll(pkg *packages.Package) (*Data, error) {
91-
cb := Data{}
91+
cb := Data{
92+
StructTarget: StructTarget,
93+
}
9294
structs := make(map[string]*ast.StructType)
9395
for _, file := range pkg.Syntax {
9496
for _, decl := range file.Decls {

0 commit comments

Comments
 (0)