I am a beginner in Goland and try to use your code. Without attachment code work perfectly, But when I try to use code for attachment from your post on Medium I have a panic error and do not understand how t fix it.
in this code
_, err = GmailService.Users.Messages.Send("me", &message).Do()
if err != nil {
log.Printf("Error: %v !!!!!", err)
} else {
fmt.Println("Message sent!")
}
return true, nil
and response
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x96e727]
I am a beginner in Goland and try to use your code. Without attachment code work perfectly, But when I try to use code for attachment from your post on Medium I have a panic error and do not understand how t fix it.
in this code
_, err = GmailService.Users.Messages.Send("me", &message).Do()
if err != nil {
log.Printf("Error: %v !!!!!", err)
} else {
fmt.Println("Message sent!")
}
return true, nil
and response
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x96e727]