diff options
Diffstat (limited to 'modules/base/tool_test.go')
-rw-r--r-- | modules/base/tool_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/base/tool_test.go b/modules/base/tool_test.go index f99edd5fbf..04cd682907 100644 --- a/modules/base/tool_test.go +++ b/modules/base/tool_test.go @@ -299,21 +299,21 @@ func TestFileSize(t *testing.T) { func TestSubtract(t *testing.T) { toFloat64 := func(n interface{}) float64 { - switch n.(type) { + switch n := n.(type) { case int: - return float64(n.(int)) + return float64(n) case int8: - return float64(n.(int8)) + return float64(n) case int16: - return float64(n.(int16)) + return float64(n) case int32: - return float64(n.(int32)) + return float64(n) case int64: - return float64(n.(int64)) + return float64(n) case float32: - return float64(n.(float32)) + return float64(n) case float64: - return n.(float64) + return n default: return 0.0 } |