mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
9 lines
253 B
Go
9 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
|
||
|
}
|