The WithAlignment methods on FooterFormattingBuilder, HeaderFormattingBuilder, and RowFormattingBuilder are deprecated.
To configure alignments, use the Alignment method on the respective builder with WithGlobal or WithPerColumn from an AlignmentConfigBuilder. Alternatively, apply a complete tw.CellAlignment configuration using WithHeaderAlignmentConfig, WithFooterAlignmentConfig, or WithRowAlignmentConfig.
Migration Examples:
For Footer:
// Old (deprecated)
builder.Footer().Formatting().WithAlignment(tw.AlignRight)
// New (recommended)
builder.Footer().Alignment().WithGlobal(tw.AlignRight)
// Or
table.Options(WithFooterAlignmentConfig(tw.CellAlignment{Global: tw.AlignRight}))
For Header:
// Old (deprecated)
builder.Header().Formatting().WithAlignment(tw.AlignCenter)
// New (recommended)
builder.Header().Alignment().WithGlobal(tw.AlignCenter)
// Or
table.Options(WithHeaderAlignmentConfig(tw.CellAlignment{Global: tw.AlignCenter}))
For Rows:
// Old (deprecated)
builder.Row().Formatting().WithAlignment(tw.AlignLeft)
// New (recommended)
builder.Row().Alignment().WithGlobal(tw.AlignLeft)
// Or
table.Options(WithRowAlignmentConfig(tw.CellAlignment{Global: tw.AlignLeft}))