1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

refactor: interface{} -> any

This commit is contained in:
dudaodong
2022-03-16 18:41:40 +08:00
parent af480efa8c
commit c939b26cb8
34 changed files with 194 additions and 195 deletions

View File

@@ -17,7 +17,7 @@ type people struct {
type peopleAgeComparator struct{}
// Compare implements github.com/duke-git/lancet/lancetconstraints/constraints.go/Comparator
func (pc *peopleAgeComparator) Compare(v1 interface{}, v2 interface{}) int {
func (pc *peopleAgeComparator) Compare(v1 any, v2 any) int {
p1, _ := v1.(people)
p2, _ := v2.(people)
@@ -47,7 +47,7 @@ var peoples = []people{
type intComparator struct{}
func (c *intComparator) Compare(v1 interface{}, v2 interface{}) int {
func (c *intComparator) Compare(v1 any, v2 any) int {
val1, _ := v1.(int)
val2, _ := v2.(int)