Format implements the NodeFormatter interface
(ctx *FmtCtx)
| 212 | |
| 213 | // Format implements the NodeFormatter interface |
| 214 | func (o *BackupOptions) Format(ctx *FmtCtx) { |
| 215 | var addSep bool |
| 216 | maybeAddSep := func() { |
| 217 | if addSep { |
| 218 | ctx.WriteString(", ") |
| 219 | } |
| 220 | addSep = true |
| 221 | } |
| 222 | if o.CaptureRevisionHistory { |
| 223 | ctx.WriteString("revision_history") |
| 224 | addSep = true |
| 225 | } |
| 226 | |
| 227 | if o.EncryptionPassphrase != nil { |
| 228 | maybeAddSep() |
| 229 | ctx.WriteString("encryption_passphrase=") |
| 230 | o.EncryptionPassphrase.Format(ctx) |
| 231 | } |
| 232 | |
| 233 | if o.Detached { |
| 234 | maybeAddSep() |
| 235 | ctx.WriteString("detached") |
| 236 | } |
| 237 | |
| 238 | if o.EncryptionKMSURI != nil { |
| 239 | maybeAddSep() |
| 240 | ctx.WriteString("kms=") |
| 241 | o.EncryptionKMSURI.Format(ctx) |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | // CombineWith merges other backup options into this backup options struct. |
| 246 | // An error is returned if the same option merged multiple times. |
nothing calls this directly
no test coverage detected