mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-23 19:47:07 +09:00
Less naked returns (#25713)
just a step towards #25655 and some related refactoring
This commit is contained in:
32 files changed
+254
-239
No files matched your search
@@ -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