Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 333 | |
| 334 | // Format implements the NodeFormatter interface. |
| 335 | func (n *EnumValue) Format(ctx *FmtCtx) { |
| 336 | f := ctx.flags |
| 337 | if f.HasFlags(FmtAnonymize) { |
| 338 | ctx.WriteByte('_') |
| 339 | } else if f.HasFlags(FmtMarkRedactionNode) { |
| 340 | ctx.WriteString(string(redact.StartMarker())) |
| 341 | lexbase.EncodeSQLString(&ctx.Buffer, string(*n)) |
| 342 | ctx.WriteString(string(redact.EndMarker())) |
| 343 | } else { |
| 344 | lexbase.EncodeSQLString(&ctx.Buffer, string(*n)) |
| 345 | } |
| 346 | } |
| 347 | |
| 348 | // EnumValueList represents a list of enum values. |
| 349 | type EnumValueList []EnumValue |
nothing calls this directly
no test coverage detected