util: Ptr() returns itself with uintptr
This commit is contained in:
parent
9122954e62
commit
05a85ac27f
@ -8,7 +8,7 @@ import (
|
||||
|
||||
// Ptr returns the pointer to these things:
|
||||
// - First element of a slice or array, nil if it has zero length;
|
||||
// - The pointer itself if the parameter is a pointer, pointing to an scalar value.
|
||||
// - The pointer itself if the parameter is a pointer/uintptr, pointing to an scalar value.
|
||||
// It panics otherwise.
|
||||
func Ptr(d interface{}) (addr unsafe.Pointer) {
|
||||
if d == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user