summaryrefslogtreecommitdiffhomepage
path: root/context_test.go
diff options
context:
space:
mode:
authorFrancis Lavoie <[email protected]>2022-08-02 16:39:09 -0400
committerGitHub <[email protected]>2022-08-02 16:39:09 -0400
commit141872ed80d6323505e7543628c259fdae8506d3 (patch)
tree53581cddf2fcce189c3a55019194b64b0cd3af13 /context_test.go
parentdb1aa5b5bc174e5a5df39a277f737b304e1e2350 (diff)
downloadcaddy-141872ed80d6323505e7543628c259fdae8506d3.tar.gz
caddy-141872ed80d6323505e7543628c259fdae8506d3.zip
chore: Bump up to Go 1.19, minimum 1.18 (#4925)
Diffstat (limited to 'context_test.go')
-rw-r--r--context_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/context_test.go b/context_test.go
index afa10dbd0..27395612c 100644
--- a/context_test.go
+++ b/context_test.go
@@ -71,13 +71,13 @@ func ExampleContext_LoadModule_array() {
},
}
- // since our input is []json.RawMessage, the output will be []interface{}
+ // since our input is []json.RawMessage, the output will be []any
mods, err := ctx.LoadModule(myStruct, "GuestModulesRaw")
if err != nil {
// you'd want to actually handle the error here
// return fmt.Errorf("loading guest modules: %v", err)
}
- for _, mod := range mods.([]interface{}) {
+ for _, mod := range mods.([]any) {
myStruct.guestModules = append(myStruct.guestModules, mod.(io.Writer))
}
@@ -104,13 +104,13 @@ func ExampleContext_LoadModule_map() {
},
}
- // since our input is map[string]json.RawMessage, the output will be map[string]interface{}
+ // since our input is map[string]json.RawMessage, the output will be map[string]any
mods, err := ctx.LoadModule(myStruct, "GuestModulesRaw")
if err != nil {
// you'd want to actually handle the error here
// return fmt.Errorf("loading guest modules: %v", err)
}
- for modName, mod := range mods.(map[string]interface{}) {
+ for modName, mod := range mods.(map[string]any) {
myStruct.guestModules[modName] = mod.(io.Writer)
}