diff --git a/compare/compare.go b/compare/compare.go index a2a1837..e3cd33b 100644 --- a/compare/compare.go +++ b/compare/compare.go @@ -66,6 +66,7 @@ func GreaterOrEqual(left, right any) bool { } // InDelta checks if two values are equal or not within a delta. +// Play: https://go.dev/play/p/TuDdcNtMkjo func InDelta[T constraints.Integer | constraints.Float](left, right T, delta float64) bool { return float64(mathutil.Abs(left-right)) <= delta } diff --git a/cryptor/basic.go b/cryptor/basic.go index c0f5b7e..2b45f24 100644 --- a/cryptor/basic.go +++ b/cryptor/basic.go @@ -105,7 +105,7 @@ func HmacMd5(str, key string) string { } // HmacMd5WithBase64 return the hmac hash of string use md5 with base64. -// todo +// https://go.dev/play/p/UY0ng2AefFC func HmacMd5WithBase64(data, key string) string { h := hmac.New(md5.New, []byte(key)) h.Write([]byte(data))