Skip to content

Commit

Permalink
Merge pull request #65 from vaskoz/failingBuild
Browse files Browse the repository at this point in the history
Failing build
  • Loading branch information
thinkingserious committed Oct 5, 2018
2 parents 809db2e + 68a7a9f commit 0d9fc28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions smtpapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,16 @@ func escapeUnicode(input string) string {
// surrogate pair
var r1, r2 = utf16.EncodeRune(r)
var s = fmt.Sprintf("\\u%x\\u%x", r1, r2)
buffer.WriteString(s)
// error always nil https://golang.org/pkg/bytes/#Buffer.WriteString
buffer.WriteString(s) // nolint: gas, gosec
} else if r > 127 {
var s = fmt.Sprintf("\\u%04x", r)
buffer.WriteString(s)
// error always nil https://golang.org/pkg/bytes/#Buffer.WriteString
buffer.WriteString(s) // nolint: gas, gosec
} else {
var s = fmt.Sprintf("%c", r)
buffer.WriteString(s)
// error always nil https://golang.org/pkg/bytes/#Buffer.WriteString
buffer.WriteString(s) // nolint: gas, gosec
}
}
return buffer.String()
Expand Down
2 changes: 1 addition & 1 deletion smtpapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ func TestLicenceDate(t *testing.T) {
t.Fatalf("cannot open license file; got %v", err)
}

r := regexp.MustCompile("(\\d+-\\d+)")
r := regexp.MustCompile(`(\d+-\d+)`)
dates := r.FindString(string(b))

if dates == "" {
Expand Down

0 comments on commit 0d9fc28

Please sign in to comment.