File: nopc.go

package info (click to toggle)
golang-golang-x-exp 0.0~git20221028.83b7d23-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bookworm-backports
  • size: 6,276 kB
  • sloc: ansic: 1,900; sh: 278; objc: 276; asm: 48; makefile: 14
file content (13 lines) | stat: -rw-r--r-- 396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2022 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 file.

// Use the nopc flag for benchmarks, on the assumption
// that retrieving the pc will become cheap.

//go:build nopc

package slog

// pc returns 0 to avoid incurring the cost of runtime.Callers.
func pc(depth int) uintptr { return 0 }