(ic *Inception, si *StructInfo)
| 36 | } |
| 37 | |
| 38 | func CreateUnmarshalJSON(ic *Inception, si *StructInfo) error { |
| 39 | out := "" |
| 40 | ic.OutputImports[`fflib "github.com/pquerna/ffjson/fflib/v1"`] = true |
| 41 | if len(si.Fields) > 0 { |
| 42 | ic.OutputImports[`"bytes"`] = true |
| 43 | } |
| 44 | ic.OutputImports[`"fmt"`] = true |
| 45 | |
| 46 | out += tplStr(decodeTpl["header"], header{ |
| 47 | IC: ic, |
| 48 | SI: si, |
| 49 | }) |
| 50 | |
| 51 | out += tplStr(decodeTpl["ujFunc"], ujFunc{ |
| 52 | SI: si, |
| 53 | IC: ic, |
| 54 | ValidValues: validValues, |
| 55 | ResetFields: ic.ResetFields, |
| 56 | }) |
| 57 | |
| 58 | ic.OutputFuncs = append(ic.OutputFuncs, out) |
| 59 | |
| 60 | return nil |
| 61 | } |
| 62 | |
| 63 | func handleField(ic *Inception, name string, typ reflect.Type, ptr bool, quoted bool) string { |
| 64 | return handleFieldAddr(ic, name, false, typ, ptr, quoted) |
no test coverage detected
searching dependent graphs…