mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-23 14:10:50 +01:00
Compare commits
4 commits
3e4d8e3acd
...
d91c62fbea
Author | SHA1 | Date | |
---|---|---|---|
d91c62fbea | |||
|
e9ff81052e | ||
3311e4df77 | |||
|
7caf0b8e19 |
4 changed files with 16 additions and 9 deletions
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
|
@ -54,7 +54,7 @@ jobs:
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
|
uses: github/codeql-action/init@29d86d22a34ea372b1bbf3b2dced2e25ca6b3384 # v3.26.1
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
@ -65,7 +65,7 @@ jobs:
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
|
uses: github/codeql-action/autobuild@29d86d22a34ea372b1bbf3b2dced2e25ca6b3384 # v3.26.1
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
|
@ -79,4 +79,4 @@ jobs:
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
|
uses: github/codeql-action/analyze@29d86d22a34ea372b1bbf3b2dced2e25ca6b3384 # v3.26.1
|
||||||
|
|
2
.github/workflows/scorecards.yml
vendored
2
.github/workflows/scorecards.yml
vendored
|
@ -75,6 +75,6 @@ jobs:
|
||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@eb055d739abdc2e8de2e5f4ba1a8b246daa779aa # v3.26.0
|
uses: github/codeql-action/upload-sarif@29d86d22a34ea372b1bbf3b2dced2e25ca6b3384 # v3.26.1
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|
11
msg.go
11
msg.go
|
@ -684,11 +684,18 @@ func (m *Msg) GetBoundary() string {
|
||||||
return m.boundary
|
return m.boundary
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetAttachements sets the attachements of the message.
|
// SetAttachments sets the attachments of the message.
|
||||||
func (m *Msg) SetAttachements(files []*File) {
|
func (m *Msg) SetAttachments(files []*File) {
|
||||||
m.attachments = files
|
m.attachments = files
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetAttachements sets the attachments of the message.
|
||||||
|
//
|
||||||
|
// Deprecated: use SetAttachments instead.
|
||||||
|
func (m *Msg) SetAttachements(files []*File) {
|
||||||
|
m.SetAttachments(files)
|
||||||
|
}
|
||||||
|
|
||||||
// UnsetAllAttachments unset the attachments of the message.
|
// UnsetAllAttachments unset the attachments of the message.
|
||||||
func (m *Msg) UnsetAllAttachments() {
|
func (m *Msg) UnsetAllAttachments() {
|
||||||
m.attachments = nil
|
m.attachments = nil
|
||||||
|
|
|
@ -1413,7 +1413,7 @@ func TestMsg_SetAttachments(t *testing.T) {
|
||||||
for _, f := range tt.files {
|
for _, f := range tt.files {
|
||||||
files = append(files, &File{Name: f})
|
files = append(files, &File{Name: f})
|
||||||
}
|
}
|
||||||
m.SetAttachements(files)
|
m.SetAttachments(files)
|
||||||
if len(m.attachments) != len(files) {
|
if len(m.attachments) != len(files) {
|
||||||
t.Errorf("SetAttachements() failed. Number of attachments expected: %d, got: %d", len(files),
|
t.Errorf("SetAttachements() failed. Number of attachments expected: %d, got: %d", len(files),
|
||||||
len(m.attachments))
|
len(m.attachments))
|
||||||
|
@ -1448,7 +1448,7 @@ func TestMsg_UnsetAllAttachments(t *testing.T) {
|
||||||
for _, f := range tt.attachments {
|
for _, f := range tt.attachments {
|
||||||
files = append(files, &File{Name: f})
|
files = append(files, &File{Name: f})
|
||||||
}
|
}
|
||||||
m.SetAttachements(files)
|
m.SetAttachments(files)
|
||||||
|
|
||||||
if len(m.attachments) != len(files) {
|
if len(m.attachments) != len(files) {
|
||||||
t.Errorf("SetAttachements() failed. Number of attachments expected: %d, got: %d", len(files),
|
t.Errorf("SetAttachements() failed. Number of attachments expected: %d, got: %d", len(files),
|
||||||
|
@ -1610,7 +1610,7 @@ func TestMsg_UnsetAllParts(t *testing.T) {
|
||||||
for _, f := range tt.attachments {
|
for _, f := range tt.attachments {
|
||||||
attachments = append(attachments, &File{Name: f})
|
attachments = append(attachments, &File{Name: f})
|
||||||
}
|
}
|
||||||
m.SetAttachements(attachments)
|
m.SetAttachments(attachments)
|
||||||
if len(m.attachments) != len(attachments) {
|
if len(m.attachments) != len(attachments) {
|
||||||
t.Errorf("SetAttachements() failed. Number of attachments files expected: %d, got: %d",
|
t.Errorf("SetAttachements() failed. Number of attachments files expected: %d, got: %d",
|
||||||
len(attachments), len(m.attachments))
|
len(attachments), len(m.attachments))
|
||||||
|
|
Loading…
Reference in a new issue