Skip to content

Commit

Permalink
Simple field
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Jul 31, 2024
1 parent 82ee52d commit 7728546
Show file tree
Hide file tree
Showing 5 changed files with 17,514 additions and 11,019 deletions.
2 changes: 1 addition & 1 deletion generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (g *Generator) FuncNameForMessage(msg *protobuf.Message) string {
return "To_" + msg.FullTypeName()
}
func (g *Generator) FuncNameForOneOf(msg *protobuf.Message, field protobuf.Field) string {
return "Set_OneOf_" + msg.FullTypeName() + "_" + field.GetName()
return "To_OneOf_" + msg.FullTypeName() + "_" + field.GetName()
}

func (g *Generator) FuncNameForOptional(msg *protobuf.Message, field protobuf.Field) string {
Expand Down
2 changes: 1 addition & 1 deletion generator/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func Test_Generator(t *testing.T) {

require.NoError(t, err)

err = os.WriteFile("../templates/output.proto", content, 0644)
err = os.WriteFile("../templates/gen_types.go", content, 0644)
require.NoError(t, err)
fmt.Println("All done!")
}
Loading

0 comments on commit 7728546

Please sign in to comment.