From a4ceb326c4eb592ab989f1202584ea2cfded574f Mon Sep 17 00:00:00 2001 From: renovate Date: Sat, 19 Jun 2021 17:25:55 +0000 Subject: Update module github.com/google/go-cmp to v0.5.6 --- .../google/go-cmp/cmp/internal/value/pointer_unsafe.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go') diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go index da134ae..a605953 100644 --- a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go @@ -1,6 +1,6 @@ // Copyright 2018, The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE.md file. +// license that can be found in the LICENSE file. // +build !purego @@ -24,3 +24,13 @@ func PointerOf(v reflect.Value) Pointer { // which is necessary if the GC ever uses a moving collector. return Pointer{unsafe.Pointer(v.Pointer()), v.Type()} } + +// IsNil reports whether the pointer is nil. +func (p Pointer) IsNil() bool { + return p.p == nil +} + +// Uintptr returns the pointer as a uintptr. +func (p Pointer) Uintptr() uintptr { + return uintptr(p.p) +} -- cgit v1.2.3-54-g00ecf