aboutsummaryrefslogtreecommitdiff
path: root/internal/feed
diff options
context:
space:
mode:
Diffstat (limited to 'internal/feed')
-rw-r--r--internal/feed/mail.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/feed/mail.go b/internal/feed/mail.go
index 256c4fe..e8b6915 100644
--- a/internal/feed/mail.go
+++ b/internal/feed/mail.go
@@ -16,7 +16,7 @@ func address(name, address string) []*mail.Address {
return []*mail.Address{{Name: name, Address: address}}
}
-func fromAdress(feed *Feed, item feeditem, cfg config.Config) []*mail.Address {
+func fromAdress(feed *Feed, item feeditem, cfg *config.Config) []*mail.Address {
switch {
case item.Item.Author != nil && item.Item.Author.Email != "":
return address(item.Item.Author.Name, item.Item.Author.Email)
@@ -35,7 +35,7 @@ func writeHtml(writer io.Writer, item feeditem) error {
return template.Feed.Execute(writer, item)
}
-func writeToBuffer(b *bytes.Buffer, feed *Feed, item feeditem, cfg config.Config) error {
+func writeToBuffer(b *bytes.Buffer, feed *Feed, item feeditem, cfg *config.Config) error {
var h mail.Header
h.SetAddressList("From", fromAdress(feed, item, cfg))
h.SetAddressList("To", address(feed.Name, cfg.DefaultEmail))
@@ -98,7 +98,7 @@ func writeToBuffer(b *bytes.Buffer, feed *Feed, item feeditem, cfg config.Config
return nil
}
-func asMail(feed *Feed, item feeditem, cfg config.Config) (string, error) {
+func asMail(feed *Feed, item feeditem, cfg *config.Config) (string, error) {
var b bytes.Buffer
if err := writeToBuffer(&b, feed, item, cfg); err != nil {
@@ -108,7 +108,7 @@ func asMail(feed *Feed, item feeditem, cfg config.Config) (string, error) {
return b.String(), nil
}
-func (feed *Feed) ToMails(cfg config.Config) ([]string, error) {
+func (feed *Feed) ToMails(cfg *config.Config) ([]string, error) {
var (
err error
mails = make([]string, len(feed.items))
=35186fcf79b56eb943c477715ad9b41ae9c5365b&follow=1'>Explicitly set permissions when running 'install'Christophe Fergeau1-3/+3 2012-09-07No need for a shebang in bash completion fileChristophe Fergeau1-1/+1 2012-09-06Update COPYING to reflect man page and project page.1.1.2Jason A. Donenfeld1-10/+11 2012-09-06Use BINDIR, MANDIR and SYSCONFDIR vars in MakefileChristophe Fergeau1-5/+8 2012-09-06Add dependencies to README.Jason A. Donenfeld1-0/+8 2012-09-06Change debian name.Jason A. Donenfeld5-5/+4 2012-09-06Use more normal sleep variant.1.1.1Jason A. Donenfeld1-1/+1 2012-09-06Use --noreport instead of head -n -2 for tree so that it works on mac.Jason A. Donenfeld1-1/+1 2012-09-05Be sure to explicitly state that install is a phony target.Jason A. Donenfeld1-0/+2 2012-09-05Bump debian version horribly.1.1Jason A. Donenfeld2-2/+2 2012-09-04No echo mode.Jason A. Donenfeld2-16/+42 2012-09-04Properly quote the path too.Jason A. Donenfeld1-1/+1 2012-09-04Allow passwords having spaces to go unbroken to the clipboard.Bernardo Freitas Paulo da Costa1-1/+1 2012-09-04Separate out the massive git example.Jason A. Donenfeld1-10/+14 2012-09-04Prepare for debianification.1.0Jason A. Donenfeld9-4/+60 2012-09-03Fix readme typo.Jason A. Donenfeld1-1/+1 2012-09-03Show program name properly in error message.Jason A. Donenfeld1-1/+1 2012-09-03Move examples into manpage.Jason A. Donenfeld4-93/+224 2012-09-03Make into a real project.Jason A. Donenfeld8-5/+173 2012-09-03Support pass gitJason A. Donenfeld2-1/+15 2012-08-31Add remove synonyms.Jason A. Donenfeld1-2/+2 2012-08-31Use basename in usage.Jason A. Donenfeld1-2/+1 2012-08-19now using gpg_id as a varMatthew Ramirez1-2/+2 2012-08-07Forty five seconds.Jason A. Donenfeld1-1/+1 2012-08-06Deal with klipper and new lines.Jason A. Donenfeld1-3/+19 2012-08-06Update examples.Jason A. Donenfeld1-7/+7 2012-08-06Update readme.Jason A. Donenfeld1-11/+13 2012-08-06Be slicker and more like git.Jason A. Donenfeld1-114/+173