Skip to content

Commit bff4ddd

Browse files
authored
resources/page: Use reflect.TypeFor
1 parent 885cd29 commit bff4ddd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎resources/page/pagegroup.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ func (p PagesGroup) Reverse() PagesGroup {
104104
}
105105

106106
var (
107-
errorType = reflect.TypeOf((*error)(nil)).Elem()
108-
pagePtrType = reflect.TypeOf((*Page)(nil)).Elem()
109-
pagesType = reflect.TypeOf(Pages{})
107+
errorType = reflect.TypeFor[error]()
108+
pagePtrType = reflect.TypeFor[Page]()
109+
pagesType = reflect.TypeFor[Pages]()
110110
)
111111

112112
// GroupBy groups by the value in the given field or method name and with the given order.

0 commit comments

Comments
 (0)