diff options
author | Joe Chen <jc@unknwon.io> | 2023-02-02 21:25:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 21:25:25 +0800 |
commit | c53a1998c589a544b25d53f6e6fdf0f24a4df25b (patch) | |
tree | 1c3c9d693ba551eecfbc535be942e40b5acf9cf7 /internal/tool/tool.go | |
parent | 614382fec0ba05149785539ab93560d4d42c194d (diff) |
all: replace `interface{}` with `any` (#7330)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/tool/tool.go')
-rw-r--r-- | internal/tool/tool.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/tool/tool.go b/internal/tool/tool.go index bc6dda11..ab46a884 100644 --- a/internal/tool/tool.go +++ b/internal/tool/tool.go @@ -93,7 +93,7 @@ const TIME_LIMIT_CODE_LENGTH = 12 + 6 + 40 // CreateTimeLimitCode generates a time limit code based on given input data. // Format: 12 length date time string + 6 minutes string + 40 sha1 encoded string -func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string { +func CreateTimeLimitCode(data string, minutes int, startInf any) string { format := "200601021504" var start, end time.Time @@ -306,7 +306,7 @@ func TimeSince(t time.Time, lang string) template.HTML { } // Subtract deals with subtraction of all types of number. -func Subtract(left, right interface{}) interface{} { +func Subtract(left, right any) any { var rleft, rright int64 var fleft, fright float64 isInt := true |