Skip to content

Commit

Permalink
add comment for WithComments function
Browse files Browse the repository at this point in the history
  • Loading branch information
verscheures authored and joeig committed Feb 9, 2024
1 parent a5feff0 commit 1c118e7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions records.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const (
RRTypeWKS RRType = "WKS"
)

// Define a function to create a comment option
// WithComments defines a function to create a comment option for Add and Change methods
func WithComments(comments ...Comment) func(*RRset) {
return func(r *RRset) {
r.Comments = append(r.Comments, comments...)
Expand All @@ -179,7 +179,6 @@ func (r *RecordsService) Add(ctx context.Context, domain string, name string, re

// Change replaces an existing resource record
func (r *RecordsService) Change(ctx context.Context, domain string, name string, recordType RRType, ttl uint32, content []string, options ...func(*RRset)) error {

rrset := new(RRset)
rrset.Name = &name
rrset.Type = &recordType
Expand Down Expand Up @@ -261,7 +260,6 @@ func (r *RecordsService) prepareRRSet(rrSet *RRset) *RRsets {
}

func (r *RecordsService) patchRRSet(ctx context.Context, domain string, rrSets *RRsets) error {

req, err := r.client.newRequest(ctx, "PATCH", fmt.Sprintf("servers/%s/zones/%s", r.client.VHost, makeDomainCanonical(domain)), nil, &rrSets)
if err != nil {
return err
Expand Down

0 comments on commit 1c118e7

Please sign in to comment.