diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-17 22:03:27 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-03-17 22:03:27 +0100 |
commit | b80853de90b10171155b8f3fde47d64ec7bfa0dd (patch) | |
tree | 435d3dbf7a495a0c6ce64c9769e037179aa0d27b /common/collections/slice.go | |
parent | 423594e03a906ef4150f433666ff588b022c3c92 (diff) |
all: gofmt -w -r 'interface{} -> any' .
Updates #9687
Diffstat (limited to 'common/collections/slice.go')
-rw-r--r-- | common/collections/slice.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/collections/slice.go b/common/collections/slice.go index 07ad48eb3..51cb6ec1f 100644 --- a/common/collections/slice.go +++ b/common/collections/slice.go @@ -21,11 +21,11 @@ import ( // in collections.Slice template func to get types such as Pages, PageGroups etc. // instead of the less useful []interface{}. type Slicer interface { - Slice(items interface{}) (interface{}, error) + Slice(items any) (any, error) } // Slice returns a slice of all passed arguments. -func Slice(args ...interface{}) interface{} { +func Slice(args ...any) any { if len(args) == 0 { return args } @@ -66,8 +66,8 @@ func Slice(args ...interface{}) interface{} { } // StringSliceToInterfaceSlice converts ss to []interface{}. -func StringSliceToInterfaceSlice(ss []string) []interface{} { - result := make([]interface{}, len(ss)) +func StringSliceToInterfaceSlice(ss []string) []any { + result := make([]any, len(ss)) for i, s := range ss { result[i] = s } |