CL 228859 refactored detecting reflect package logic in to isReflectPkg
function. The function has un-necessary nil check for p, so remove that
check.
Passes toolstash-check.
Change-Id: I2f3f1ac967fe8d176dda3f3b4698ded08602e2fa
Reviewed-on: https://go-review.googlesource.com/c/go/+/228861
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
// isReflectPkg reports whether p is package reflect.
func isReflectPkg(p *types.Pkg) bool {
- // TODO(cuonglm): how to get rid this check.
- if p == nil {
- return false
- }
if p == localpkg {
return myimportpath == "reflect"
}