diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go
index 36ffe76c5..1ac050ab0 100644
--- a/hugolib/embedded_shortcodes_test.go
+++ b/hugolib/embedded_shortcodes_test.go
@@ -246,11 +246,11 @@ func TestShortcodeGist(t *testing.T) {
}{
{
`{{< gist spf13 7896402 >}}`,
- "(?s)^",
+ "(?s)^",
},
{
`{{< gist spf13 7896402 "img.html" >}}`,
- "(?s)^",
+ "(?s)^",
},
} {
var (
diff --git a/resource/image_test.go b/resource/image_test.go
index d6bd2b0dc..a9aacbdce 100644
--- a/resource/image_test.go
+++ b/resource/image_test.go
@@ -16,7 +16,6 @@ package resource
import (
"fmt"
"math/rand"
- "os"
"path/filepath"
"strconv"
"testing"