From b80853de90b10171155b8f3fde47d64ec7bfa0dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 17 Mar 2022 22:03:27 +0100 Subject: all: gofmt -w -r 'interface{} -> any' . Updates #9687 --- common/collections/slice.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/collections/slice.go') 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 } -- cgit v1.2.3