Skip to content

Commit

Permalink
fix codegen
Browse files Browse the repository at this point in the history
Signed-off-by: Vicent Marti <vmg@strn.cat>
  • Loading branch information
vmg committed Feb 11, 2025
1 parent 474d9fb commit 9070230
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 55 deletions.
101 changes: 50 additions & 51 deletions go/tools/asthelpergen/integration/ast_path.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions go/tools/asthelpergen/paths_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ func (p *pathGen) ptrToStructMethod(t types.Type, strct *types.Struct, spi gener

func (p *pathGen) addStep(
container types.Type, // the name of the container type
typ types.Type, // the type of the field
name string, // the name of the field
slice bool, // whether the field is a slice
typ types.Type, // the type of the field
name string, // the name of the field
slice bool, // whether the field is a slice
) {
s := step{
container: container,
Expand Down Expand Up @@ -262,6 +262,5 @@ func (p *pathGen) generateWalkCases(spi generatorSPI) []jen.Code {
cases = append(cases, jen.Default().Block(
jen.Return(jen.Nil()),
))

return cases
}

0 comments on commit 9070230

Please sign in to comment.