Skip to content

Commit

Permalink
comment mailbuilder options
Browse files Browse the repository at this point in the history
  • Loading branch information
xoba committed Feb 6, 2023
1 parent e388283 commit 896bfad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func Builder(options ...BuilderOption) MailBuilder {
return b
}

// BuilderOption controls an aspect of MailBuilder.
type BuilderOption interface {
apply(*MailBuilder)
}
Expand All @@ -53,6 +54,7 @@ func (r *randOption) apply(b *MailBuilder) {
b.rand = r.rand
}

// RandBuilderOption controls MailBuilder's source of randomness.
func RandBuilderOption(r *rand.Rand) BuilderOption {
return &randOption{rand: r}
}
Expand Down

0 comments on commit 896bfad

Please sign in to comment.