Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes #57

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions email.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

secretmanager "cloud.google.com/go/secretmanager/apiv1"
"cloud.google.com/go/secretmanager/apiv1/secretmanagerpb"
scrape "github.com/muly/product-scrape"

Check failure on line 13 in email.go

View workflow job for this annotation

GitHub Actions / build

reading github.com/muly/product-scrape/go.mod at revision v1.0.5: git ls-remote -q origin in /home/runner/go/pkg/mod/cache/vcs/d043bf9c73c3bb2318b19657b8787a2b627b6ad39a1400ffc49be744b99779db: exit status 128:
"gopkg.in/mail.v2"
)

Expand Down Expand Up @@ -88,7 +88,6 @@

func prepareTrackNotificationEmail(t trackInput, p scrape.Product) (*mail.Message, error) {
var emailBody string
var priceString string
log.Println("creating mail")
m := mail.NewMessage()
m.SetHeader("From", systemEmailID)
Expand All @@ -105,7 +104,7 @@
emailBody = strings.Replace(emailBody, "Product Name", p.Name, -1)
emailBody = strings.Replace(emailBody, "product-image", p.Image, -1)
if p.Price != 0 {
priceString = strconv.FormatFloat(p.Price, 'f', -1, 64)
priceString := strconv.FormatFloat(p.Price, 'f', -1, 64)
emailBody = strings.Replace(emailBody, "PRICE", "available at ₹"+priceString+"</p>", -1)
} else {
emailBody = strings.Replace(emailBody, "PRICE", "available now</p>", -1)
Expand Down
Loading