(required: boolean, goType: string)
| 387 | } |
| 388 | |
| 389 | function goJSONOmitSuffix(required: boolean, goType: string): string { |
| 390 | if (required) return ""; |
| 391 | return goTypeIsSlice(goType) || goTypeIsMap(goType) ? ",omitzero" : ",omitempty"; |
| 392 | } |
| 393 | |
| 394 | function goJSONTag(jsonName: string, required: boolean, goType: string): string { |
| 395 | return `json:"${jsonName}${goJSONOmitSuffix(required, goType)}"`; |
no test coverage detected
searching dependent graphs…