fix golint issues in core/mathx (#498)

This commit is contained in:
Kevin Wan
2021-02-21 20:47:01 +08:00
committed by GitHub
parent 334ee4213f
commit 8872d7cbd3
4 changed files with 10 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import "math"
const epsilon = 1e-6
// CalcEntropy calculates the entropy of m.
func CalcEntropy(m map[interface{}]int) float64 {
if len(m) == 0 || len(m) == 1 {
return 1