mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-27 03:23:34 +00:00
chore: modernize the codebase using go 1.26 (#278)
This runs: ``` go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./... ``` over the codebase, as this is using go 1.26, it can also use the new new() functionallity so AsPtr and boolPtr is are needed anymore. Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
+3
-1
@@ -62,6 +62,8 @@ type VolumeClient interface {
|
||||
}
|
||||
|
||||
// AsPtr returns a pointer to the given value. Useful for optional fields in API structs.
|
||||
//
|
||||
//go:fix inline
|
||||
func AsPtr[T any](v T) *T {
|
||||
return &v
|
||||
return new(v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user