Explorar o código

Clarify the depth direction with the parameter

Signed-off-by: Matt Bolt <mbolt35@gmail.com>
Matt Bolt %!s(int64=2) %!d(string=hai) anos
pai
achega
5738bdcb71
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/pkg/util/typeutil/typeutil.go

+ 1 - 1
core/pkg/util/typeutil/typeutil.go

@@ -92,6 +92,6 @@ func PackageFromCaller(depth int) string {
 // CurrentPackage returns the package name of the caller. This is especially handy for automatically
 // generating package scoped tracing identifiers.
 func CurrentPackage() string {
-	// Depth is from: (0) Caller -> (1) CurrentPackage -> (2) PackageFromCaller
+	// Depth is from: (2) Caller -> (1) CurrentPackage -> (0) PackageFromCaller
 	return PackageFromCaller(2)
 }