mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Less naked returns (#25713)
just a step towards #25655 and some related refactoring
This commit is contained in:
		@@ -256,3 +256,8 @@ func ToFloat64(number any) (float64, error) {
 | 
			
		||||
	}
 | 
			
		||||
	return value, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ToPointer returns the pointer of a copy of any given value
 | 
			
		||||
func ToPointer[T any](val T) *T {
 | 
			
		||||
	return &val
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user