generateReadWithTypeInfoMethod generates the ReadWithTypeInfo method
(buf *bytes.Buffer, s *StructInfo)
| 530 | |
| 531 | // generateReadWithTypeInfoMethod generates the ReadWithTypeInfo method |
| 532 | func generateReadWithTypeInfoMethod(buf *bytes.Buffer, s *StructInfo) error { |
| 533 | fmt.Fprintf(buf, "// ReadWithTypeInfo deserializes with pre-read type information\n") |
| 534 | fmt.Fprintf(buf, "func (g *%s_ForyGenSerializer) ReadWithTypeInfo(ctx *fory.ReadContext, refMode fory.RefMode, typeInfo *fory.TypeInfo, value reflect.Value) {\n", s.Name) |
| 535 | fmt.Fprintf(buf, "\tg.Read(ctx, refMode, false, false, value)\n") |
| 536 | fmt.Fprintf(buf, "}\n\n") |
| 537 | return nil |
| 538 | } |
| 539 | |
| 540 | // generateCode generates code with package-based naming (legacy mode) |
| 541 | func generateCode(pkg *packages.Package, structs []*StructInfo) error { |
no outgoing calls
no test coverage detected