Skip to content

Commit 44a03ed

Browse files
committed
FIXUP: review, Mar 3
1 parent 79c8eb8 commit 44a03ed

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

internal/controller/postgrescluster/postgres.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (*Reconciler) generatePostgresHBAs(
5959
result := new(postgres.OrderedHBAs)
6060
result.Append(builtin.Mandatory...)
6161

62-
// Append any rules specified in the the Patroni section.
62+
// Append any rules specified in the Patroni section.
6363
before := result.Length()
6464
result.AppendUnstructured(patroni.PostgresHBAs(cluster.Spec.Patroni)...)
6565

internal/postgres/hba.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,6 @@ type OrderedHBAs struct {
160160

161161
// Append renders and adds pg_hba.conf lines to o. Nil pointers are ignored.
162162
func (o *OrderedHBAs) Append(hbas ...*HostBasedAuthentication) {
163-
o.records = slices.Grow(o.records, len(hbas))
164-
165163
for _, hba := range hbas {
166164
if hba != nil {
167165
o.records = append(o.records, hba.String())
@@ -172,8 +170,6 @@ func (o *OrderedHBAs) Append(hbas ...*HostBasedAuthentication) {
172170
// AppendUnstructured trims and adds unvalidated pg_hba.conf lines to o.
173171
// Empty lines and lines that are entirely control characters are omitted.
174172
func (o *OrderedHBAs) AppendUnstructured(hbas ...string) {
175-
o.records = slices.Grow(o.records, len(hbas))
176-
177173
for _, hba := range hbas {
178174
hba = strings.TrimFunc(hba, func(r rune) bool {
179175
// control characters, space, and backslash

0 commit comments

Comments
 (0)