mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 06:35:07 +01:00
8 lines
253 B
Go
8 lines
253 B
Go
package lnutils
|
|
|
|
// PTr returns the pointer of the given value. This is useful in instances
|
|
// where a function returns the value, but a pointer is wanted. Without this,
|
|
// then an intermediate variable is needed.
|
|
func Ptr[T any](v T) *T {
|
|
return &v
|
|
}
|