Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 1711 | |
| 1712 | // Format implements the NodeFormatter interface. |
| 1713 | func (d *DIPAddr) Format(ctx *FmtCtx) { |
| 1714 | f := ctx.flags |
| 1715 | bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings)) |
| 1716 | if !bareStrings { |
| 1717 | ctx.WriteByte('\'') |
| 1718 | } |
| 1719 | ctx.WriteString(d.IPAddr.String()) |
| 1720 | if !bareStrings { |
| 1721 | ctx.WriteByte('\'') |
| 1722 | } |
| 1723 | } |
| 1724 | |
| 1725 | // Size implements the Datum interface. |
| 1726 | func (d *DIPAddr) Size() uintptr { |