2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-12-01 01:33:29 +00:00
|
|
|
|
|
|
|
// Package ptr contains the ptr.To function.
|
|
|
|
package ptr
|
|
|
|
|
|
|
|
// To returns a pointer to a shallow copy of v.
|
|
|
|
func To[T any](v T) *T {
|
|
|
|
return &v
|
|
|
|
}
|