summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/templates/tplcontext_test.go
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2023-11-01 17:57:48 +0100
committerTom Barrett <tom@tombarrett.xyz>2023-11-01 18:11:33 +0100
commit240c3d1338415e5d82ef7ca0e52c4284be6441bd (patch)
tree4b0ee5d208c2cdffa78d65f1b0abe0ec85f15652 /modules/caddyhttp/templates/tplcontext_test.go
parent73e78ab226f21e6c6c68961af88c4ab9c746f4f4 (diff)
parent0e204b730aa2b1fa0835336b1117eff8c420f713 (diff)
vbump to v2.7.5HEADcaddy-cgi
Diffstat (limited to 'modules/caddyhttp/templates/tplcontext_test.go')
-rw-r--r--modules/caddyhttp/templates/tplcontext_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/caddyhttp/templates/tplcontext_test.go b/modules/caddyhttp/templates/tplcontext_test.go
index 15a369e..fdf2c10 100644
--- a/modules/caddyhttp/templates/tplcontext_test.go
+++ b/modules/caddyhttp/templates/tplcontext_test.go
@@ -18,7 +18,6 @@ import (
"bytes"
"context"
"fmt"
- "io/ioutil"
"net/http"
"os"
"path/filepath"
@@ -221,21 +220,21 @@ func TestNestedInclude(t *testing.T) {
// create files and for test case
if test.parentFile != "" {
absFilePath = filepath.Join(fmt.Sprintf("%s", context.Root), test.parentFile)
- if err := ioutil.WriteFile(absFilePath, []byte(test.parent), os.ModePerm); err != nil {
+ if err := os.WriteFile(absFilePath, []byte(test.parent), os.ModePerm); err != nil {
os.Remove(absFilePath)
t.Fatalf("Test %d: Expected no error creating file, got: '%s'", i, err.Error())
}
}
if test.childFile != "" {
absFilePath0 = filepath.Join(fmt.Sprintf("%s", context.Root), test.childFile)
- if err := ioutil.WriteFile(absFilePath0, []byte(test.child), os.ModePerm); err != nil {
+ if err := os.WriteFile(absFilePath0, []byte(test.child), os.ModePerm); err != nil {
os.Remove(absFilePath0)
t.Fatalf("Test %d: Expected no error creating file, got: '%s'", i, err.Error())
}
}
if test.child2File != "" {
absFilePath1 = filepath.Join(fmt.Sprintf("%s", context.Root), test.child2File)
- if err := ioutil.WriteFile(absFilePath1, []byte(test.child2), os.ModePerm); err != nil {
+ if err := os.WriteFile(absFilePath1, []byte(test.child2), os.ModePerm); err != nil {
os.Remove(absFilePath0)
t.Fatalf("Test %d: Expected no error creating file, got: '%s'", i, err.Error())
}