ptr.go 227 B

12345678910
  1. // Copyright (c) Tailscale Inc & AUTHORS
  2. // SPDX-License-Identifier: BSD-3-Clause
  3. // Package ptr contains the ptr.To function.
  4. package ptr
  5. // To returns a pointer to a shallow copy of v.
  6. func To[T any](v T) *T {
  7. return &v
  8. }