Closed Chiiruno closed 6 years ago
@Chiiruno the best way would probably be to add an RWMutex internally in the email handler unless there is a way to know when the email log will occur.
I'll look at adding this quickly.
@Chiiruno I'm going to make a single method to change the email config, otherwise, I think that you'll end up with a race in the middle of changing half of your settings.
That would be ideal, I assume you'll probably set the struct options in email.Log
, like the following?
email.once.Do(func() {
email.formatter = email.formatFunc(email)
})
Thank you.
Oh ok, that sounds a lot safer.
not quite how I'll do it, the formatter will still not be editable.
I saw the pull, thank you for doing that.
@Chiiruno changes made!
Sorry to make another issue, but I just noticed that, and I'm a bit new to Go in general. How would I synchronize the changes in the email handler (or log itself?), for instance? I can't seem to find any way.