(a *Array)
| 341 | } |
| 342 | |
| 343 | func (e *encodeGen) gArray(a *Array) { |
| 344 | if !e.p.ok() { |
| 345 | return |
| 346 | } |
| 347 | e.fuseHook() |
| 348 | // shortcut for [const]byte |
| 349 | if be, ok := a.Els.(*BaseElem); ok && (be.Value == Byte || be.Value == Uint8) { |
| 350 | e.p.printf("\nerr = en.WriteBytes((%s)[:])", a.Varname()) |
| 351 | e.p.wrapErrCheck(e.ctx.ArgsStr()) |
| 352 | return |
| 353 | } |
| 354 | |
| 355 | e.writeAndCheck(arrayHeader, literalFmt, coerceArraySize(a.Size)) |
| 356 | setTypeParams(a.Els, a.typeParams) |
| 357 | e.p.rangeBlock(e.ctx, a.Index, a.Varname(), e, a.Els) |
| 358 | } |
| 359 | |
| 360 | func (e *encodeGen) gBase(b *BaseElem) { |
| 361 | if !e.p.ok() { |
nothing calls this directly
no test coverage detected