mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	refactor: append, build variable and type switch (#4940)
* refactor: append, build variable and type switch * fix: remove redundant space.
This commit is contained in:
		@@ -306,21 +306,21 @@ func TestFileSize(t *testing.T) {
 | 
			
		||||
 | 
			
		||||
func TestSubtract(t *testing.T) {
 | 
			
		||||
	toFloat64 := func(n interface{}) float64 {
 | 
			
		||||
		switch n := n.(type) {
 | 
			
		||||
		switch v := n.(type) {
 | 
			
		||||
		case int:
 | 
			
		||||
			return float64(n)
 | 
			
		||||
			return float64(v)
 | 
			
		||||
		case int8:
 | 
			
		||||
			return float64(n)
 | 
			
		||||
			return float64(v)
 | 
			
		||||
		case int16:
 | 
			
		||||
			return float64(n)
 | 
			
		||||
			return float64(v)
 | 
			
		||||
		case int32:
 | 
			
		||||
			return float64(n)
 | 
			
		||||
			return float64(v)
 | 
			
		||||
		case int64:
 | 
			
		||||
			return float64(n)
 | 
			
		||||
			return float64(v)
 | 
			
		||||
		case float32:
 | 
			
		||||
			return float64(n)
 | 
			
		||||
			return float64(v)
 | 
			
		||||
		case float64:
 | 
			
		||||
			return n
 | 
			
		||||
			return v
 | 
			
		||||
		default:
 | 
			
		||||
			return 0.0
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user