Просмотр исходного кода

Clarify the depth direction with the parameter

Signed-off-by: Matt Bolt <mbolt35@gmail.com>
Matt Bolt 2 лет назад
Родитель
Сommit
5738bdcb71
1 измененных файлов с 1 добавлено и 1 удалено
  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)
 }