mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
refactor: modernize, remove AsPtr (#300)
modernize missed this in #278, but AsPtr can also be removed here and replace with new() Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
1 parent
7ec8879af3
commit
4b34c42b76
2 files changed
+3
-10
No files matched your search
@@ -60,10 +60,3 @@ type VolumeClient interface {
|
||||
ListVolumes(ctx context.Context, filter *VolumeFilter) ([]MachineVolume, error)
|
||||
RemoveVolume(ctx context.Context, machineNameOrID, volumeName string, force bool) error
|
||||
}
|
||||
|
||||
// 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 new(v)
|
||||
}
|
||||
Reference in new issue
Block a user