Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 1981 | |
| 1982 | // Format implements the NodeFormatter interface. |
| 1983 | func (d *DIPAddr) Format(ctx *FmtCtx) { |
| 1984 | f := ctx.flags |
| 1985 | bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings)) |
| 1986 | if !bareStrings { |
| 1987 | ctx.WriteByte('\'') |
| 1988 | } |
| 1989 | ctx.WriteString(d.IPAddr.String()) |
| 1990 | if !bareStrings { |
| 1991 | ctx.WriteByte('\'') |
| 1992 | } |
| 1993 | } |
| 1994 | |
| 1995 | // Size implements the Datum interface. |
| 1996 | func (d *DIPAddr) Size() uintptr { |