Skip to content

Commit

Permalink
Merge pull request #3 from marvinruder/main
Browse files Browse the repository at this point in the history
Use reference to record and zone for adding reference to client
  • Loading branch information
acim authored Sep 9, 2023
2 parents 67aba98 + 94963cc commit c9ed111
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ func (c *Client) ZonesByKeyword(ctx context.Context, keyword string) ([]Zone, er
page = root.Meta.Pagination.NextPage
}

for _, z := range zones {
for i := range zones {
z := &zones[i]
z.c = c
}

Expand Down
3 changes: 2 additions & 1 deletion zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func (z *Zone) Records(ctx context.Context) ([]Record, error) {
page = root.Meta.Pagination.NextPage
}

for _, r := range records {
for i := range records {
r := &records[i]
r.c = z.c
r.zoneID = r.ID
}
Expand Down

0 comments on commit c9ed111

Please sign in to comment.