(s *Ptr)
| 316 | } |
| 317 | |
| 318 | func (e *encodeGen) gPtr(s *Ptr) { |
| 319 | if !e.p.ok() { |
| 320 | return |
| 321 | } |
| 322 | e.fuseHook() |
| 323 | e.p.printf("\nif %s == nil { err = en.WriteNil(); if err != nil { return; } } else {", s.Varname()) |
| 324 | if s.typeParams.TypeParams != "" { |
| 325 | tp := s.typeParams |
| 326 | tp.isPtr = true |
| 327 | s.Value.SetTypeParams(tp) |
| 328 | } |
| 329 | next(e, s.Value) |
| 330 | e.p.closeblock() |
| 331 | } |
| 332 | |
| 333 | func (e *encodeGen) gSlice(s *Slice) { |
| 334 | if !e.p.ok() { |
nothing calls this directly
no test coverage detected