Sha256: b130f458cd6a19d05018f98db5b1dd12d4910204a3be8379040271c3d4d0b311
Contents?: true
Size: 425 Bytes
Versions: 16
Compression:
Stored size: 425 Bytes
Contents
//go:build go1.18 // +build go1.18 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package to // Ptr returns a pointer to the provided value. func Ptr[T any](v T) *T { return &v } // SliceOfPtrs returns a slice of *T from the specified values. func SliceOfPtrs[T any](vv ...T) []*T { slc := make([]*T, len(vv)) for i := range vv { slc[i] = Ptr(vv[i]) } return slc }
Version data entries
16 entries across 16 versions & 1 rubygems