mirror of
				https://github.com/ClusterCockpit/cc-metric-collector.git
				synced 2025-10-31 00:55:06 +01:00 
			
		
		
		
	Add missing case for type []int32
This commit is contained in:
		| @@ -123,6 +123,13 @@ func avgfunc(args interface{}) (interface{}, error) { | ||||
| 			s += x | ||||
| 		} | ||||
| 		return s / int64(len(values)), nil | ||||
| 	case []int32: | ||||
| 		var s int32 = 0 | ||||
| 		for _, x := range values { | ||||
| 			s += x | ||||
| 		} | ||||
| 		return s / int32(len(values)), nil | ||||
|  | ||||
| 	} | ||||
| 	return 0.0, nil | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user