Skip to content

Commit

Permalink
fix(compare): support int64
Browse files Browse the repository at this point in the history
relates to #3309
  • Loading branch information
JanDeDobbeleer committed Sep 9, 2023
1 parent 346091f commit 250cb00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/template/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func gt(e1, e2 interface{}) bool {
if val, OK := e1.(int); OK {
return val > interFaceToInt(e2)
}
if val, OK := e1.(int64); OK {
return val > int64(interFaceToInt(e2))
}
if val, OK := e1.(float64); OK {
return val > interfaceToFloat64(e2)
}
Expand Down

2 comments on commit 250cb00

@trajano
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why interFaceToInt capitalizes F in interface?

@JanDeDobbeleer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trajano because I can't type 😆

Please sign in to comment.