Compare commits

..

No commits in common. "02308df4fd5e4cda2dc1bec87475a879f6e3f3f9" and "cf87ea68d3e973f544478bead89c2f3e6f22434e" have entirely different histories.

3 changed files with 1 additions and 19 deletions

View file

@ -44,7 +44,7 @@ jobs:
run: | run: |
go test -v -race --coverprofile=./cov.out ./... go test -v -race --coverprofile=./cov.out ./...
- uses: sonarsource/sonarqube-scan-action@aecaf43ae57e412bd97d70ef9ce6076e672fe0a9 # master - uses: sonarsource/sonarqube-scan-action@540792c588b5c2740ad2bb4667db5cd46ae678f2 # master
env: env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

5
msg.go
View file

@ -679,11 +679,6 @@ func (m *Msg) GetAttachments() []*File {
return m.attachments return m.attachments
} }
// GetBoundary returns the boundary of the Msg
func (m *Msg) GetBoundary() string {
return m.boundary
}
// SetAttachements sets the attachements of the message. // SetAttachements sets the attachements of the message.
func (m *Msg) SetAttachements(files []*File) { func (m *Msg) SetAttachements(files []*File) {
m.attachments = files m.attachments = files

View file

@ -2855,19 +2855,6 @@ func TestMsg_GetBccString(t *testing.T) {
} }
} }
// TestMsg_GetBoundary will test the Msg.GetBoundary method
func TestMsg_GetBoundary(t *testing.T) {
b := "random_boundary_string"
m := NewMsg()
if boundary := m.GetBoundary(); boundary != "" {
t.Errorf("GetBoundary failed. Expected empty string, but got: %s", boundary)
}
m = NewMsg(WithBoundary(b))
if boundary := m.GetBoundary(); boundary != b {
t.Errorf("GetBoundary failed. Expected boundary: %s, got: %s", b, boundary)
}
}
// TestMsg_AttachEmbedReader_consecutive tests the Msg.AttachReader and Msg.EmbedReader // TestMsg_AttachEmbedReader_consecutive tests the Msg.AttachReader and Msg.EmbedReader
// methods with consecutive calls to Msg.WriteTo to make sure the attachments are not // methods with consecutive calls to Msg.WriteTo to make sure the attachments are not
// lost (see Github issue #110) // lost (see Github issue #110)